Re: [GENERAL] plpgsql dynamic queries and optional arguments

2006-08-16 Thread Michael Fuhr
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

Re: [GENERAL] plpgsql dynamic queries and optional arguments

2006-08-16 Thread Curtis Scheer
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

Re: [GENERAL] plpgsql dynamic queries and optional arguments

2006-08-15 Thread Harvey, Allan AC
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

[GENERAL] plpgsql dynamic queries and optional arguments

2006-08-15 Thread Curtis Scheer
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