On Wed, Aug 8, 2012 at 8:26 AM, Bob Pawley <rjpawley(at)shaw(dot)ca> 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