Since the are only 3 possible values and one session variable, it shouldn't be that big of a deal? Seemed like a lot more overhead setting up pivot tables or something similar... Regards, Eric J. Hoffman Managing Partner EJH & Associates, LLC A Decision That Matters. EJHA.
-------------------------------------------------------- Eric J. Hoffman Managing Partner 2081 Industrial Blvd StillwaterMN55082 mail: [EMAIL PROTECTED] www: www.ejhassociates.com tel: 651.207.1526 fax: 651.207.1536 mob: 651.245.2717 -------------------------------------------------------- This message contains confidential information and is intended only for [EMAIL PROTECTED] If you are not [email protected] you should not disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Eric J. Hoffman therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. -------------------------------------------------------- ________________________________ From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Mon 2/6/2006 8:34 PM To: CF-Talk Subject: RE: Query finding data IN If you don't want to change the DB design you could try: SELECT * FROM YourTable WHERE YourColumn LIKE '%,#YourVariable#,%' OR YourColumn LIKE '#YourVariable#,%' OR YourColumn LIKE '%,#YourVariable#' Given a values like: 1,2,3,7,4,5,6 7,1,2,3,4,5,6 1,2,3,4,5,6,7 Looking for 7 it should match all three. Which seems like overkill, but looks like it'd work. Now I'm sure there might be a better way to do this. Personally I'd change the table design. Adrian -----Original Message----- From: Eric J. Hoffman [mailto:[EMAIL PROTECTED] Sent: 07 February 2006 02:01 To: CF-Talk Subject: Query finding data IN Have a query here I am not sure how to find the answer.... Have a field in the database with a comma list of items...and want it to only pull a record based upon a session variable that is a single integer. So how do I say give me records where database field(comma delimited) contains session variable? example: Where table.sites HAS session.variable ....I know has isn't the right term, but this is the english of it. Thanks. -------------------------------------------------------- Eric J. Hoffman Managing Partner 2081 Industrial Blvd StillwaterMN55082 mail: [EMAIL PROTECTED] www: www.ejhassociates.com tel: 651.207.1526 fax: 651.207.1536 mob: 651.245.2717 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231558 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

