Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Is there a better way to do that?

Author  Topic 

jeff06
Posting Yak Master

166 Posts

Posted - 2007-02-21 : 16:21:36
select *
from dbo.RPT_ContractDetails
where businessname like '%blimp%'
or businessname like '%subway%'
or businessname like '%quizno%'
or businessname like '%ponderosa%'
or businessname like '%quincy%'
or businessname like '%Red oak%'
or businessname like '%IHOP%'
or businessname like '%Cottman%'
or businessname like '%aamco%'
or businessname like '%subway%'
or businessname like '%blimp%'
or businessname like '%Dairy queen%'

The above code works and I have more to add on. Is there a better way to do that?

Thanks

X002548
Not Just a Number

15586 Posts

Posted - 2007-02-21 : 16:27:30
INSERT The Values into anothr Table and join to it?

select *
from dbo.RPT_ContractDetails
join SearchTable
ON businessname like '%'+SearchColumn+'%'





Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

jeff06
Posting Yak Master

166 Posts

Posted - 2007-02-21 : 16:32:50
Great! This is the way I want. Thanks
Go to Top of Page
   

- Advertisement -