From: Shiwei Zhang Date: 2006-12-19T18:11:59+09:00 Subject: Re: string of strings... --------------080706030508050509070205 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit ids = [22443, 22468, 22371, 22218, 22472, 22377, 22245] "IN ('"+ids.join("', '")+"')" Shiwei (The views expressed are my own and not necessarily those of Oracle and its affiliates.) Josselin wrote: > I got an array of id's : > > ids = [22443, 22468, 22371, 22218, 22472, 22377, 22245] > > I would like to get a string of strings (to be used in SQL WHERE..IN > clause > > " '22443' , ' 22468' , ' 22371' , ' 22218' , '22472' , '22377' , > '22245' " > > If a use ids.join(','), I get > "22443,22468,22371,22218,22472,22377,22245" which is obviously not > useful for SQL.... > > is there any shorcuts or should I concatenate each element ? > > thanks > > joss > > > --------------080706030508050509070205--