If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > SQL Find Text - use like ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-02-03, 04:37
vextout vextout is offline
Registered User
 
Join Date: Jan 2003
Location: New York
Posts: 160
SQL Find Text - use like ?

I got a bunch of keywords in a field
I want to search for them - would i use like ??

example

if field has the text "baby, childern, toddler"
and i enter text 'child'
would the Like command find that or would i have to use something else ?
__________________
Beyond Limitation
Reply With Quote
  #2 (permalink)  
Old 03-02-03, 15:38
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Re: SQL Find Text - use like ?

Yes, LIKE would find that - but only if you specified '%child%'. '%' matches any number of characters, so '%child%' will match any string of characters that contains 'child' somewhere, e.g. 'My eldest child is called Peter', 'I have seven grandchildren', 'Children are funny', 'I am a child' , 'child', or 'xxxxxxxxxxxxxxchildxxxxxxxxxxxxx'.

On it's own 'child' would only match the string 'child'.
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 03-02-03, 15:46
vextout vextout is offline
Registered User
 
Join Date: Jan 2003
Location: New York
Posts: 160
ahh - ok thnx for the quick reply man
__________________
Beyond Limitation
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On