Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search cell for 'op2' or 'op5' when contents are op1,op2,op5,op6...

Status
Not open for further replies.

spewn

Programmer
Joined
May 7, 2001
Messages
1,034

i am using the following:

Code:
select prodShape from shapes where type IN ('round','square')

there is no problem if the cell contents i search are only one value (eg. 'round' or 'square' or 'triangle')...however, i have several values in each cell (eg. 'round,square,triangle' or 'rectangle,triangle').

i want to be able to search all cell contents for each word, something similar to...

Code:
select prodShape from shapes where type IN ('%round%','%square%')

any ideas?

- g
 
idea #1 -- can you redesign the table?

you will be doing table scans forever, because even if you do manage to find a way to search for a word inside a list, the index, if any, on the column will be ignored

rudy | r937.com | Ask the Expert | Premium SQL Articles
SQL for Database-Driven Web Sites (next course starts May 8 2005)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top