I thought of that, but I need the query to return no records, and because of 
other statements in the where clause, this would cause the query to return all 
records.


--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

....-----Original Message-----
....From: Sam Farmer [mailto:[EMAIL PROTECTED]
....Sent: Monday, March 28, 2005 9:37 AM
....To: CF-Talk
....Subject: Re: Empty list for an IN clause
....
....Put the whole clause in a cfif statement:
....
....<cfif Safetrace.recordCount>
....   RDT_MOBLID IN (<cfqueryparam
....value="#valueList(Safetrace.R_MDL_MOBLID)#" list="yes"
....cfsqltype="cf_sql_varchar">)
....</cfif>
....
....Sam
....
....
....
....On Mon, 28 Mar 2005 09:19:35 -0800, Ian Skinner
....<[EMAIL PROTECTED]> wrote:
....> What is the simplest way to handle the possibility of an empty list for
....an IN clause.
....>
....> For Example:
....> RDT_MOBLID IN (<cfqueryparam
....value="#valueList(Safetrace.R_MDL_MOBLID)#" list="yes"
....cfsqltype="cf_sql_varchar">)
....>
....> --------------
....> Ian Skinner
....> Web Programmer
....> BloodSource
....> www.BloodSource.org
....> Sacramento, CA
....>
....> "C code. C code run. Run code run. Please!"
....> - Cynthia Dunning
....>
....> Confidentiality Notice:  This message including any
....> attachments is for the sole use of the intended
....> recipient(s) and may contain confidential and privileged
....> information. Any unauthorized review, use, disclosure or
....> distribution is prohibited. If you are not the
....> intended recipient, please contact the sender and
....> delete any copies of this message.
....>
....>
....
....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200221
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to