We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submitted by: eXandr (i.reg)
Is related to CORE740 Replaces CORE2686 Is duplicated by CORE1998 Relate to CORE3070
Votes: 9
Syntaxis:
DECLARE VARIABLE <varname> RECORD AS [TABLE|VIEW|CURSOR|PROCEDURE[OUTPUT PARAMETERS]] <table_name|view_name|cursor_name|proc_name>;
Example: .. AS DECLARE VARIABLE r RECORD AS TABLE mytable; BEGIN ... SELECT * FROM mytable INTO :r; SELECT fld1 FROM mytable INTO :r.fld1; ... END;
The text was updated successfully, but these errors were encountered:
Commented by: Ain Valtin (ain)
Looks like a nice feature :) Suggestion - also support to restrict the record variable to have only listed fields, ie
DECLARE VARIABLE <varname> RECORD[(field1, field2, ...)] AS ...
In that case the compiler should replace "*" in SELECT statement
SELECT * FROM mytable INTO :r;
with the field list from var declaration.
Sorry, something went wrong.
Link: This issue is related to CORE740 [ CORE740 ]
Link: This issue replaces CORE2686 [ CORE2686 ]
Link: This issue is duplicated by CORE1998 [ CORE1998 ]
Link: This issue relate to CORE3070 [ CORE3070 ]
No branches or pull requests
Submitted by: eXandr (i.reg)
Is related to CORE740
Replaces CORE2686
Is duplicated by CORE1998
Relate to CORE3070
Votes: 9
Syntaxis:
DECLARE VARIABLE <varname> RECORD AS [TABLE|VIEW|CURSOR|PROCEDURE[OUTPUT PARAMETERS]] <table_name|view_name|cursor_name|proc_name>;
Example:
..
AS
DECLARE VARIABLE r RECORD AS TABLE mytable;
BEGIN
...
SELECT * FROM mytable INTO :r;
SELECT fld1 FROM mytable INTO :r.fld1;
...
END;
The text was updated successfully, but these errors were encountered: