Here's just a small snippet of code that might save you a bit of a headache as your try to work out the correct syntax for SELECT... INTO... when it comes to scalar variables and tables.
As you'll note, the syntax isn't the same nor is it interchangeable.
Cheers,
Jody
DROP TABLE "EXTAB";
CREATE COLUMN TABLE "EXTAB" ("FIELD" INTEGER);
CREATE PROCEDURE "EXPROC" AS
"EXFIELD" INTEGER;
BEGIN
-- following syntax doesn't work
-- SELECT 5 INTO "EXTAB" FROM DUMMY;
-- SELECT 5 FROM DUMMY INTO "EXFIELD";
SELECT 5 INTO "EXFIELD" FROM DUMMY;
SELECT 5 FROM DUMMY INTO "EXTAB";
END;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
38 | |
19 | |
13 | |
13 | |
11 | |
10 | |
10 | |
10 | |
8 | |
8 |