Re: unable to assign value to variable in plpgsql

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: unable to assign value to variable in plpgsql
Дата
Msg-id 5300E21F.1090903@dalibo.com
обсуждение исходный текст
Ответ на unable to assign value to variable in plpgsql  (Chirag Mittal <linux@seasonstravel.co.in>)
Список pgsql-novice
On 02/16/2014 01:22 PM, Chirag Mittal wrote:
Hi, I am trying to assign number of row as integer Tried 1 maz int :=(SELECT count(col1) FROM table WHERE col1 = quote_literal(in val1)); Tried 2 EXECUTE 'SELECT count(col1) FROM table WHERE col1 = quote_literal(val1) INTO maz'; getting error INTO Regards Chirag

View this message in context: unable to assign value to variable in plpgsql
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

SELECT INTO int count(*) FROM table WHERE col1 = val1;

or

int := (SELECT count(*) FROM table WHERE col1 = val1);
-- 
Vik

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

Предыдущее
От: Chirag Mittal
Дата:
Сообщение: unable to assign value to variable in plpgsql
Следующее
От: Martin Steer
Дата:
Сообщение: Re: unable to assign value to variable in plpgsql