Re: [SQL] Variables in PSQL

2002-07-10 Thread Christoph Haller
> > I'm trying to declare a variable in PostgreSQL, so I can save some values in > it. After, I want to calculate with this variable. > For example: > > declare vp integer; > select price into :vp from article where anr = 1; > vp := vp + 1; > update article set price = :vp where anr = 1; AFAIK,

[SQL] Variables in PSQL

2002-07-09 Thread Roger Mathis
Hi I'm trying to declare a variable in PostgreSQL, so I can save some values in it. After, I want to calculate with this variable. For example: declare vp integer; select price into :vp from article where anr = 1; vp := vp + 1; update article set price = :vp where anr = 1; Is there a posibility