From: Robert Klemme Date: 2006-12-22T05:25:08+09:00 Subject: Re: string of strings... On 21.12.2006 01:14, David Vallner wrote: > Robert Klemme wrote: >> A completely different option is to create a temp table (depends on your >> DB whether and how that is done), put all the values in that temp table >> and join it against the table you are querying. > > Talk about serendipity... I was looking for a way to avoid having to do > either any sort of query string building (which I hate) or multiple > SELECTS (for obvious reasons) for a WHERE ... IN situation for work > stuff, and this one sounds quite nifty. Would the performance of that be > comparable to using a WHERE ... IN? Depends on the number of items in the temp table and probably also on indexing. My guess would be that it's pretty fast for some hundred entries. Note that not all RDBMS allow to have indexes on temp tables. MS SQL Server also has something called "table variable" which might give different results. Lots of options... :-) Kind regards robert