RE: OT DB field contains but is not first list element

2002-10-10 Thread Ben Doom

I think what you want is:

where (this_field not like '#this_item#%') and (this_field like
'%#this_item#%')

Note that there's a % at each end of this_item in the second clause.

  --Ben Doom
Programmer  General Lackey
Moonbow Software

: -Original Message-
: From: JS [mailto:[EMAIL PROTECTED]]
: Sent: Thursday, October 10, 2002 10:49 AM
: To: CF-Talk
: Subject: OT DB field contains but is not first list element
:
:
: I have a situation where I have a list of elements in
: a db field and I need to pull the records where an
: item appears somewhere in the list but is not the
: first item.  Something like
: WHERE (this_field NOT LIKE '#this_item#%') AND
: (this_field LIKE '%#this_item#')
:
: It is a SQL 7 db.
:
: TIA,
: JS
:
: __
: Do you Yahoo!?
: Faith Hill - Exclusive Performances, Videos  More
: http://faith.yahoo.com
: 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: OT DB field contains but is not first list element

2002-10-10 Thread Mosh Teitelbaum

It looks like you've already pretty much got it down:

WHERE
(this_field NOT LIKE '#this_item#%')
AND (this_field LIKE '%#this_item#%')
  ^   ^
Just put the % both before and after this_item in the second conditional
clause.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


 -Original Message-
 From: JS [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 10, 2002 10:49 AM
 To: CF-Talk
 Subject: OT DB field contains but is not first list element


 I have a situation where I have a list of elements in
 a db field and I need to pull the records where an
 item appears somewhere in the list but is not the
 first item.  Something like
 WHERE (this_field NOT LIKE '#this_item#%') AND
 (this_field LIKE '%#this_item#')

 It is a SQL 7 db.

 TIA,
 JS

 __
 Do you Yahoo!?
 Faith Hill - Exclusive Performances, Videos  More
 http://faith.yahoo.com
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: OT DB field contains but is not first list element

2002-10-10 Thread JS

That did it!

Thanks, Ben,Mosh and others.

JS




It looks like you've already pretty much got it down:

WHERE
(this_field NOT LIKE '#this_item#%')
AND (this_field LIKE '%#this_item#%')
  ^   ^
Just put the % both before and after this_item in
the second conditional
clause.

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


 -Original Message-
 From: JS [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 10, 2002 10:49 AM
 To: CF-Talk
 Subject: OT DB field contains but is not first list
element


 I have a situation where I have a list of elements
in
 a db field and I need to pull the records where an
 item appears somewhere in the list but is not the
 first item.  Something like
 WHERE (this_field NOT LIKE '#this_item#%') AND
 (this_field LIKE '%#this_item#')

 It is a SQL 7 db.

 TIA,
 JS

 __
 Do you Yahoo!?
 Faith Hill - Exclusive Performances, Videos  More
 http://faith.yahoo.com
 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.