syntax question

Поиск
Список
Период
Сортировка
От James Cooper
Тема syntax question
Дата
Msg-id 006401c2db87$fc09be00$c900a8c0@jax
обсуждение исходный текст
Ответы Re: syntax question  (Josh Berkus <josh@agliodbs.com>)
Список 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

В списке pgsql-sql по дате отправления:

Предыдущее
От:
Дата:
Сообщение: SQL Statements question, why I get errors...
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: syntax question