Vytvaram funkciu, ktora ma vlozit nieco do tabulky a hodit navratovu hodnotu, mam nieco take:
Kód:
CREATE FUNCTION TESTING.TESTABC
(X CHAR, Y DOUBLE, Z CHAR)
RETURNS DOUBLE
INSERT INTO TESTING.TT8_T8(T1, N2, T4) VALUES (X, Y, Z)
RETURN 4144
a vypisuje tuto chybu:
Kód:
ERROR: A character, token, or clause is invalid or missing.
DB2
SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=INSERT
INTO;R)
RETURNS DOUBLE
;<return>, DRIVER=3.57.82
Error Code:
-104
Query = CREATE FUNCTION TESTING.TESTABC
(X CHAR,
Y DOUBLE, Z CHAR)
RETURNS DOUBLE
INSERT INTO TESTING.TT8_T8(T1,
N2, T4) VALUES (X, Y, Z)
RETURN 4144
kde je problem ? jedna sa o: db2 9.7
ak tam nemam ten riadok s INSERT ..., ide to v pohode
RESP otazka> ako mam ten INSERT spravit v DB2 ? aky ma byt spravny syntax, aby to slapalo ?