Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > defining a vari...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 15798 of 17437
Post > Topic >>

defining a variable

by luca.ciciriello@[EMAIL PROTECTED] Jun 12, 2008 at 03:37 PM

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 re****ted. 

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



-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 2 Posts in Topic:
defining a variable
luca.ciciriello@[EMAIL PR  2008-06-12 15:37:28 
Re: defining a variable
rod@[EMAIL PROTECTED] (&  2008-06-12 18:13:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 16:03:03 CST 2008.