|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I want to have an sql query that can search within a column, for a specific word, within a few lines of text. ie: fruit: banana apple pear orange search for apple, and that list is output Using MS Access database Forgive the fruit analogy. lol |
|
#2
|
||||
|
||||
|
Code:
SELECT *
FROM TableName
WHERE FieldName IN ('Apple')
|
|
#3
|
|||
|
|||
|
Sorry not quite what i was looking for!
Needs to do this (back to the fruit again) Search for apples Database contains "shiny apples" "apples" "waxed apples" in seperate rows under the column. Search results need to display all three results, as they all contain apple but aren't equal to apple. Thanks for your quick response |
|
#4
|
||||
|
||||
|
something like this
Code:
select * from saidTable where saidTable.Field Like 'apple' check on the like keyword usage. |
|
#5
|
|||
|
|||
|
select * from table where myfield like '%apple%'
This works in SQL server and I believe the % wildcard works with newer ADO versions. If not try using * as a wildcard. This will also return applesauce and applecheeks, you'll have to do some more work to get it down to just the word apple
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > SQL searching help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|