Re: [SQL] Using union to avoid creating temp table

2002-07-01 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes: > What I ended up doing is building the input values into sepearte > select statements unioned together. So if the input values were > 'abc', 'def' and 'ghi', I would end up doing a select like: > select add.id from (select 'abc' union select 'def' union

[SQL] Using union to avoid creating temp table

2002-07-01 Thread Bruno Wolff III
I don't know if this is a well known trick or not. I wanted to check a list of values inputted to a script against some existing tables. I was trying to think of alternatives to using a temp table and copy since this would take two requests instead of one. What I ended up doing is building the in