Silly question, how do I sit in PGAdmin and declare a variable to be used later in inline statements?
Declare par_callcenterid integer;
yields:
ERROR: syntax error at or near "integer" LINE 1: Declare par_callcenterid integer;
Silly question, how do I sit in PGAdmin and declare a variable to be used later in inline statements?
Declare par_callcenterid integer;
yields:
ERROR: syntax error at or near "integer" LINE 1: Declare par_callcenterid integer;
Some people use temporary tables for storing such values. Another
way would be to write set/get functions in a language that supports
global storage (PL/Perl, PL/Tcl, PL/Python, etc.). See for example
the set_var()
and get_var()
functions in the PL/Perl
documentation: