Re: [GENERAL] How to INSERT INTO one table from another table, WHERE

2013-05-03 Thread Igor Neyman
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Kirk Wythers > Sent: Friday, May 03, 2013 1:51 PM > To: POSTGRES > Subject: [GENERAL] How to INSERT INTO one table from another table, > WHER

[GENERAL] How to INSERT INTO one table from another table, WHERE

2013-05-03 Thread Kirk Wythers
I am trying to insert data from 2 columns in tableB (colX and colY) into the same two columns of tableB, with a join like where clause. Is this possible? For example: INSERT INTO tableA (colX, colY) (SELECT colX, colY FROM tableB WHERE tableA.blockname = tableB.block_name AND t