On Wed, Aug 16, 2006 at 02:36:44PM -0500, Curtis Scheer wrote:
> Thanks for the reply I guess what I am actually looking for is an example of
> a dynamic SQL select statement similar to how a static sql select can select
> into a variable.
In 8.1 you can select a single row or columns of a single
Allan,
Thanks for the reply I guess what I am actually looking for is an example of
a dynamic SQL select statement similar to how a static sql select can select
into a variable.
Thanks,
Curtis
Curtis,
Here is an example function that uses dynamic sql.
I use it under 7.4.5
Hope this helps.
A
x27;'' || pt.savefor::varchar || '' days'''')::timestamp;'';
execute sql_str;
count := count + 1;
end loop;
return count;
end;
' LANGUAGE plpgsql;
-Original Message-----
From: [EMAIL PROTECTED] [mailt
I have a table that I would like to be
able to retrieve information out of based on a combination of multiple columns
and I would like to be able to do this through a plpgsql stored procedure.
Right now I have multiple stored procedures that I am calling based on the
values parameter values
It would be easier to help you with the quoting issues if you provided
an example of the entire query you need to execute and/or the code
you're using to build the query.
Quoting in a function can get pretty hairy sometimes. You might find
this chart helpful, I certainly have:
http://www.postg
Hi,
I am having problems in forming a dynamic query that can be used in
Execute statements.
Problem:
I have database fields that are either INT or VARCHAR. Both can have NULL.
If I use variables that hold the db field's values ... how do I need to
quote them to pass them to the query string.
e