Tomand Chris,
I tried to use a for in loop to execute the statement to try to get some dynamic functionality but I get "ERROR: missing ".." at end of SQL _expression_" what am I doing wrong?
Code:
qry := ''select * from ''|| trim(realname) ||'' where ''|| trim(searchfield) ||'' like %''||
A E [EMAIL PROTECTED] writes:
I tried to use a for in loop to execute the statement to try to get some dynamic
functionality but I get ERROR: missing .. at end of SQL expression what am I
doing wrong?
Did you declare the loop variable (here, objectdefinition) as a
record or rowtype
objectdefinition is defined as a record variable. It works fine when I remove the statement trying to get the dynamically concocted stringexecuted and the results placed into the aliasvalue variable which is varchar.
My first questionis, Can you perform a select on a variable? Such as in the case
Hi,
Was wondering if there was anything akin to an evaluate statement in Postgresql for dynamic strings?
Alex
Was wondering if there was anything akin to an evaluate statement in
Postgresql for dynamic strings?
By dint of tricky programming you can a function that can generate and
execute arbitrary strings. I believe there's even an example of this in
the docs.
Chris
---(end
Thanks. I searched for it and I found something. It tells me to use the perl module. But Tom Lanementions using the execute command see(http://archives.postgresql.org/pgsql-general/2001-03/msg01614.php).
Since I have no interest inpickingup yet anotherlanguage,I tried this:
qry := ''select *
A E [EMAIL PROTECTED] writes:
I tried to execute a dynamic sql string using the dynamic record
column name but I getting this error: ERROR: syntax error at or near
into at character 8. Does the execute statement not allow the into
keyword
It does not :-(. The best way of getting data back