can these queries be combined into one?

From: hamann(dot)w(at)t-online(dot)de
To: pgsql-general(at)postgresql(dot)org
Subject: can these queries be combined into one?
Date: 2012-03-25 07:16:51
Message-ID: wolfgang-1120325091651.A0128608@amadeus3.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am currently doing something like

select ordercode, descr, codes into temp table x from products where ...
Here codes is a bit-mapped field
update x set codes = codes | 512 from othertable t where ordercode = t.ordercode and ....
select * from x

Is there a way to avoid that temp table?

Regards
Wolfgang Hamann

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hamann.w 2012-03-25 07:16:53 table alias for update
Previous Message Jasen Betts 2012-03-25 04:39:38 Re: Upgrade questions