"Bryan Encina" <bryan(dot)encina(at)valleypres(dot)org> writes:
> which works fine, however I'd like to use a case statement on the second
> insert so that it only inserts if the signon_id is not null.
CASE is not the solution. Do something like
INSERT INTO target SELECT this, that, theother WHERE condition;
regards, tom lane