Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

--== Help with SQL query ==--

Thread Tools
 
Search this Thread
 
Old 08 May 2003 | 04:07 PM
  #1  
rik1471's Avatar
rik1471
Thread Starter
Scooby Regular
 
Joined: Nov 2001
Posts: 4,788
Likes: 0
Question

I have an ASP page I have written which displays the results from an SQL database from a simple html page query. I need to know how to query the database for any records which 'contain' the query, not 'equal' to the query.

E.g.

Record 1 fruits: "apples, pears, oranges"

If I do a select * from fruits where "query" = 'apples' it wouldn't display record 1 in the results.

Is there any way of displaying record 1 because it contains the word apples within it??

Thanx.
Old 08 May 2003 | 04:17 PM
  #2  
Andrewza's Avatar
Andrewza
Scooby Regular
 
Joined: Jan 2002
Posts: 667
Likes: 0
Post

...WHERE query LIKE '%apples%'...
Old 08 May 2003 | 04:22 PM
  #3  
rik1471's Avatar
rik1471
Thread Starter
Scooby Regular
 
Joined: Nov 2001
Posts: 4,788
Likes: 0
Post

perfect
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
ALEXSTI
General Technical
5
28 September 2015 10:29 PM
Ozne
General Technical
2
27 September 2015 04:06 PM
stevem2k
Non Scooby Related
8
07 July 2011 12:11 AM
Mkhan
Non Scooby Related
14
09 August 2001 03:07 AM
SDB
Non Scooby Related
2
27 May 2001 12:55 AM



Quick Reply: --== Help with SQL query ==--



All times are GMT +1. The time now is 07:02 PM.