Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: selecting DB on linux




Sorry I wasn't correct in what I said didn't work. Here is what
happened:

update trans t1 set t1.market = (select market from trans where
 tr_type='ORDER' and ref = t1.ref)
 where t1.tr_type = 'FILLED';

ERROR:  parser: parse error at or near "t1" 

(update and select are both on the same table; I wanted to update
market field in all the records that have tr_type = 'FILLED' with
whatever is in market field in the "ORDER" record with the same
ref field; adding a table alias in select doesn't help)

The same thing worked on oracle.

Viktor


SL Baur <steve@example.com>writes:

>Viktor Pavlenko <vp@example.com> writes in tlug@example.com:
>
>> I'm not a DB person (they write stored procedures for me;) but while
>> doing a small web-based project I noticed that UPDATE in Postgres
>> doesn't support subquery in the WHERE clause.
>
>According to the docs, this is supported.  Perhaps this is a new
>feature?

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links