On Thu, 2005-09-29 at 16:36 +1000, Stewart Ben (RBAU/EQS4) * wrote:
> > Is there a way to assing variable a value returned from query that
> > accesses the temporary table in a way you explained above?
> >
> > For instance, I can do:
> >
> > myValue := col2 FROM tmpTbl WHERE someValue = something
> Is there a way to assing variable a value returned from query that
> accesses the temporary table in a way you explained above?
>
> For instance, I can do:
>
> myValue := col2 FROM tmpTbl WHERE someValue = somethingElse...
If I'm parsing this correctly, all you need do is:
SELECT col2 INTO my
On Wed, 2005-09-28 at 10:01 -0700, codeWarrior wrote:
> >
> > ---(end of
broadcast)---
> > TIP 5: don't forget to increase your free space map settings
> >
>
> FOR rec IN EXECUTE ''SELECT COUNT(col1) AS num FROM tmpTbl WHERE col2
= " ||
> aBid || ''
"Mario Splivalo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've learned that one can't use temporary tables within the function
> unless
> EXECUTE'd the SELECTS from that temp table.
>
> So, I have a function like this:
>
> CREATE FUNCTION Foo1(int4, int4) RETURNS SETOF myType
I've learned that one can't use temporary tables within the function
unless
EXECUTE'd the SELECTS from that temp table.
So, I have a function like this:
CREATE FUNCTION Foo1(int4, int4) RETURNS SETOF myType
AS
'
DECLARE
aDataId ALIAS FOR $1;
aBid ALIAS FOR $2;
return myTyp