MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 14th, 2004, 02:50 PM
CLupo CLupo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 11 CLupo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 4 m 18 sec
Reputation Power: 0
Contains or something similiar

I am a ColdFusion developer who has been self taught in MS SQL. Something I am trying to do that should be very easy is killing me. I can do this in a couple different calls to the DB but feel I should be able to do it in one. Here is what I have/want...

I have in my DB a field that contains a comma sep. list. I am sending to a page url.id. That ID contains one number that I want to find in that field.

I can NOT use LIKE bc field might be...
1,2,3,4
1,2,3,11,12

URL.ID might be 1 so with LIKE it would find the 1 and 11 etc

I have tried...
CONTAINS (Field, 'URL.ID') Which would work but CONTAINS ignores numbers from what I am reading (and the error message says this).

Any help greatly appreciated. I just need someone to help me with this Where Clause.

Thanks again Chris

Reply With Quote
  #2  
Old September 15th, 2004, 03:59 PM
timseal timseal is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Philadelphia
Posts: 8 timseal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Normalise your design to get rid of the comma seperation.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Contains or something similiar


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT