Click to See Complete Forum and Search --> : Stored Procedure


jakobens
May 13th, 2006, 06:54 AM
hi everyone..

i am using Mimer and have a database with table lets say A..
i want to write a funtion to insert valuesinto table A.

i have som syntax problems and stucked..

i tried :

@
CREATE FUNCTION addelemnt (x INTEGER, y VARCHAR(20))
RETURNS ???? //i just insert element, what should it return

BEGIN

INSERT INTO A VALUES(x,y)

RETURN ??

END
@

doesnt works..
what should the return values be..


any idea will be appreciated..
thnk you all...

Igor Soukhov
May 13th, 2006, 10:12 PM
In your case there is no real need to a value from UDF (user defined function) - hence use a sproc (stored procedures do not required to have a return value while all UDFs must be either scalar-valued or table-valued) to implement your functionality.

PS: here is the link (http://developer.mimer.com/validator/parser99/index.tml#parser) to validate SQL (simple SQL statements, sprocs and UDFs as well) written for the MIMER database engine.