On Wed, Aug 8, 2012 at 8:26 AM, Bob Pawley <rjpawley@xxxxxxx> wrote: > Hi > > select > case when somevariable = 2 > then (insert into pipe (line) ... > > I am attempting to use the above. However, with or without the enclosing > brackets I get a syntax error on the word into. Utterly untested, but does it work if you put a RETURNING clause onto the INSERT? That would make it functionally similar to a SELECT, a technique that works for me in other situations. ChrisA -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general