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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to wordsearch a table

Status
Not open for further replies.

JaybeeinTekTips

Technical User
Nov 5, 2004
20
GB
Hi, I'd like to search an entire table for a term, rather like,

SELECT *
FROM [dbo].[tablename]
where columname like '%blade%'

Except the term could exist in ANY column of the table...

Cheers,

JB
 
Jay,
This would work for you
Code:
SELECT  *
FROM  [dbo].[tablename]
where columname like '%blade%'
or columname2 like '%blade%'
or columname2 like '%blade%'
or ... [COLOR=red]Repeat for each column[/color]

- Paul
- Database performance looks fine, it must be the Network!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top