syntax question

From: "James Cooper" <jim(at)luckydigital(dot)com>
To: "sql" <pgsql-sql(at)postgresql(dot)org>
Subject: syntax question
Date: 2003-02-23 22:07:41
Message-ID: 006401c2db87$fc09be00$c900a8c0@jax
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

FOR total IN EXECUTE subquery LOOP

END LOOP;

RETURN total.tot;

I have a function that returns a total from a dynamic query I use to generate the total query

I've tried to modify it as a loop to get a single row value is unnecessary but I'm failing on my syntax

I've tried

select into total subquery

-but it wont work(when I attempt this I remove the select from the beginning of my sub query)

can someone show me the syntax to execute a select into with a string that contains a query in it?

James

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message plist 2003-02-23 22:17:53 SQL Statements question, why I get errors...
Previous Message Bruno Wolff III 2003-02-23 20:45:42 Re: Help with query involving aggregation and joining.