Greg,

It displays properly. Isaac's response explained why I was getting the extra quotes.

Thanks for your response,

Sam




 --- On Wed 07/17, Greg Luce  wrote:
From: Greg Luce [mailto: [EMAIL PROTECTED]]
To: [EMAIL PROTECTED]
Date: Wed 07/17
Subject: RE: Build Query with IN in WHERE clause

> When you display the #templist# what does it look like? Not in SQL.
> 
> Greg Luce
> eDiets.com
> 3801 W. Hillsboro Blvd
> Deerfield Beach, FL 33442
> [EMAIL PROTECTED]
> 954.360.9022 x116
> 
> 
> -----Original Message-----
> From: jgeorges [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, July 17, 2002 9:15 AM
> To: CF-Talk
> Subject: Build Query with IN in WHERE clause
> 
> 
> I have an array containing alphanumeric user ID's.  I am trying to build
> a query that will select data if the user ID is in the array, i.e.
> 
> select * from employee where userid in
> ('userid1','userid2',...,'useridn')
> 
> I used  and 
> 
> select * from employee where userid in ('#tempList#')
> 
> This resolved to
> 
> select * from employee where userid in ('userid1'',''userid2') which
> failed.
> 
> I then built a string tempList = 'userid1','userid2' and used
> 
> select * from employee where userid in (#tempList#)
> 
> This resolved to 
> 
> select * from employee where userid in (''userid1'',''userid2'') which
> failed.
> 
> I've tried building the whole SQL string in a variable with the same
> results.
> 
> I tried using double quotes as well.
> 
> I am using CF5 and SQL Server 6.5.
> 
> Any Help would be appreciated.
> 
> TIA,
> 
> Sam
> 
> 
> 
> 
> ------------------------------------------------
> Can a Web portal forever change your life?
> Win up to $25 Million on iWon - click here!
> 
> 
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to