stored-functions Questions
2
Solved
Everywhere I look it seems MySQL stored procedures can do transactions. Yet when I declare my stored function
create function test( a int )
returns int
MODIFIES SQL DATA
BEGIN
START TRANSACTION ;
...
Tournai asked 6/6, 2013 at 18:49
10
Solved
What is the MySQL command to show the definition of a procedure, similar to sp_helptext in Microsoft SQL Server?
I know that SHOW PROCEDURE STATUS will display the list of the procedures available....
Hydrophyte asked 28/12, 2009 at 10:6
3
Solved
I'm trying to make a function that recursively builds a path for a specific category
CREATE FUNCTION getPath(inId INT)
RETURNS TEXT
DETERMINISTIC
BEGIN
DECLARE return_path TEXT;
DECLARE return_p...
Popham asked 20/9, 2010 at 13:49
2
Solved
I'm looking to create a package, already have a working procedure. Working on a function, step by step and I have encountered an
ORA-06575: Package or function PROJECT_LENGTH is in an invalid stat...
Overall asked 3/1, 2019 at 17:12
8
CREATE FUNCTION error "This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA"
Our database has a function to generate an order number. It reads a value from a Settings table, increments it, then returns the new value. For example:
CREATE FUNCTION NextOrderNumber() RETURNS I...
Noonan asked 7/2, 2011 at 10:50
7
Solved
Version: SQLServer 8
I would like to view the contents of a stored function in sqlserver, i.e. what exactly the function is doing.
None of the options listed here work for me. There doesn't appea...
Commodus asked 20/3, 2013 at 11:13
3
Solved
I've been looking for the last hour or so and haven't found a conclusive answer to this seemingly simple problem:
How do you call a stored MYSQL function/procedure and use its output in further SE...
Plagiarize asked 30/7, 2013 at 10:43
7
What is the main difference between functions and procedures in Oracle?
Why must I use procedures if I can do everything with functions?
If I cannot call procedure in sql statement, ok, I'll write...
Dissymmetry asked 21/8, 2014 at 6:32
1
Solved
I've been reading about the error on the question title but I cannot figure out what is the error on my code below:
CREATE function [RPT].[MonthlyRollupDates_Delimited]()
RETURNS @table TABLE (Val...
Hobson asked 5/12, 2018 at 15:22
2
I am struggling to figure out how to best handle the return of results or errors to my application from Postgres stored functions.
Consider the following contrived psudeocode example:
app.get_res...
Amon asked 7/5, 2018 at 11:2
5
Solved
I'm slowly moving from MSSQL to PostgreSQL.
In MSSQL I could call editing of already saved procedure or function, and the administration shell (SQL Server Management Studio) showed me procedure's ...
Alack asked 25/3, 2012 at 14:12
2
Solved
How can I write a dynamic SELECT INTO query inside a PL/pgSQL function in Postgres?
Say I have a variable called tb_name which is filled in a FOR loop from information_schema.tables. Now I have a...
Cachalot asked 1/9, 2017 at 11:9
4
Solved
create or replace function ar_knyga_egzistuoja(
id number
)
return number
is
kiekis number;
begin
select count(*) into kiekis from knygos where kn_id = id;
return kiekis;
end;
C# code:
conn.Open...
Clemen asked 21/4, 2014 at 14:46
2
Solved
When refactoring PostgreSql functions (and more specific: while searching for 'unused' functions) it would be handy to have a function available to search for a specific string within the function ...
Zeiler asked 15/12, 2010 at 10:26
2
Solved
im trying to create a function
CREATE FUNCTION `func`(param1 INT, param2 INT, param3 TEXT) RETURNS int(11)
BEGIN
INSERT INTO `table1` (`column1`, `column2`, `column3` )
VALUES (param1, param2, pa...
Standardize asked 29/11, 2012 at 10:5
2
so i have these two tables:
-- Table user
columns: id,name,surname, password,token,earnedmoney
-- Table addlisting
columns: id, user_fk,price,date_added
Here is my problem: I would like to c...
Potiche asked 8/7, 2016 at 14:7
1
Solved
I'm new to using jdbc to execute mysql stored procedures. My question is that is it possible to call an stored procedure which returns a table in jdbc?
I searched a lot and I know I can return a ce...
Tippet asked 23/6, 2016 at 21:7
1
Solved
I am trying to create a Stored Procedure in PostgreSQL. The function works when I use float, but when I try to change the floats to numeric I get an error:
ERROR: cannot change return type of exi...
Paleobotany asked 22/8, 2015 at 20:12
10
Solved
SQL Server 2005 has great sys.XXX views on the system catalog which I use frequently.
What stumbles me is this: why is there a sys.procedures view to see info about your stored procedures, but ther...
Whaley asked 22/1, 2009 at 10:56
4
If I call a function several time then will it execute every time or just execute once and the value will be used then after several time?
Example:
select my_function('filed'),my_function('filed'...
Marcusmarcy asked 16/1, 2013 at 10:53
3
I am using ado.net.
I have a function jsp in my database that takes 2 parameters and returns a table. I need to prompt the user for the two parameters, then execute the jsp function and print the ...
Indigotin asked 27/3, 2014 at 22:15
1
Solved
I want to update a column in table stats with the specific column being a parameter, then return the updated value of that column [only has 1 row]:
CREATE FUNCTION grow(col varchar) RETURNS integ...
Lyublin asked 4/12, 2014 at 3:48
4
I am new to PostgreSQL and want to create a database using a stored function.
For ex:
CREATE OR REPLACE FUNCTION mt_test(dbname character varying)
RETURNS integer AS
$BODY$
Create Database $1;
...
Penal asked 8/12, 2010 at 9:51
2
I would like to use goto in MySQL stored function.
How can I use?
Sample code is:
if (action = 'D') then
if (rowcount > 0) then
DELETE FROM datatable WHERE id = 2;
else
SET p=CONCAT('Can n...
Tass asked 21/6, 2012 at 8:28
2
Solved
What is the mechanism to force the MySQL to throw an error within the stored procedure?
I have a procedure which call s another function:
PREPARE my_cmd FROM @jobcommand;
EXECUTE my_cmd;
DEALLOCATE...
Unceasing asked 1/2, 2011 at 13:6
1 Next >
© 2022 - 2024 — McMap. All rights reserved.