On Sun, Jan 13, 2013 at 7:00 PM, Robert James <srobertjames@xxxxxxxxx> wrote: > I have a lot of VALUES I want to INSERT. But only a subset of them - > only those that meet a JOIN criteria involving another table. > > I could INSERT them into a temp table, and then do a SELECT INTO. But > do I need to do that? Is there any way to do a INSERT... VALUES ... > WHERE... What you're probably looking for is an insert .. select statment like so: insert into tablea (col1, col2, col3) select colx, coly, colz from tableb where somecondition; -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general