|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
selecting records with a word somewhere in a field
Originally posted by : Michael Haseltine (haseltin@u.arizona.edu)Hello all:I posted this in the asp forum, but just found this list and figure it's more appropriate here.I want to select records that have a word somewhere in a field, and I thought 'like' wouldwork, but it's not. Here's what I'm doing:select * from bibliography where keyword like 'myword'However, it only selects records where myword is the only word in the field. I've also triedputting asterisks inside the single quotes, but then it doesn't select ANY records.Any guidance here greatly appreciated. Thanks.
|
|
#2
|
|||
|
|||
|
Originally posted by : Patrick O'Byrne (patrick_obyrne@braitrim.com)Tryselect * from bibliography where keyword like '%myword%'The '%' is a wilcard symbolPatrick------------Michael Haseltine at 1/10/2002 12:11:47 PMHello all:I posted this in the asp forum, but just found this list and figure it's more appropriate here.I want to select records that have a word somewhere in a field, and I thought 'like' wouldwork, but it's not. Here's what I'm doing:select * from bibliography where keyword like 'myword'However, it only selects records where myword is the only word in the field. I've also triedputting asterisks inside the single quotes, but then it doesn't select ANY records.Any guidance here greatly appreciated. Thanks.
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > selecting records with a word somewhere in a field |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|