dynamic sql statements and OUT variables

Поиск
Список
Период
Сортировка
От Girish Bajaj
Тема dynamic sql statements and OUT variables
Дата
Msg-id 008301c355a6$85f6ec30$7764a8c0@tietronix.com
обсуждение исходный текст
Список pgsql-novice

1)       How do I get the value back for this dynamic statement?

 

minUserID := execute ''SELECT MIN(userid) as minID FROM '' || campQueueTableName;

 

campQueueTableName and  minUserID  are variables. The language is plpgsql. I want the value of what comes back in the MIN to be stored in the variable.

 

2)       How do I do this?

 

Select myValue := userid FROM table1;

 

Where I want the value of what comes out from userid col, to go into the variable declared as myValue. Language is plpgsql.

 

 

Thanks,

Girish

 

 

 

 

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

Предыдущее
От:
Дата:
Сообщение: Re: Retrieving NULL records
Следующее
От: "Henshall, Stuart - TNP Southwest"
Дата:
Сообщение: Re: dynamic sql statements and OUT variables