defining a variable

Поиск
Список
Период
Сортировка
От luca.ciciriello@email.it
Тема defining a variable
Дата
Msg-id d3046f7f157e420aafac52df812eef1b@85.18.140.153
обсуждение исходный текст
Ответы Re: defining a variable  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
Hi All.

I need to create a sql script and launch it from pgadmin. In this script
some sql statements (INSERT) have to depend from the result of previous
statements (SELECT).
Is there a way to define a variable in SQL and set its value with the result
of a SELECT query?

Using the psql console I've used the command set var 'val'; and this
statement works fine.
Usising the same command from pgadmin an error is reported.

Im using postgres 8.2 on WindowsXp environment.

Thanks in advance.

Luca.
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f

 Sponsor:
 VOGLIA DI VACANZE ?
A Riccione i Family Hotels sono gli alberghi specializzati per le vacanze
dei bambini
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7983&d=20080612



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

Предыдущее
От: Stefan Schwarzer
Дата:
Сообщение: Re: pg_query & $result re-fill
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Unable to dump database using pg_dump