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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 combining where & IN clause ?

Author  Topic 

mike123
Master Smack Fu Yak Hacker

1462 Posts

Posted - 2009-11-18 : 13:01:07
Hi,

I am trying to add a where clause to a query of mine, but its not working.

Is there a way I can do this ?


AND referrerURL in ('%http://www.google.com/%','http://www.google.co.uk/%','http://www.google.ca/%','http://www.google.com.au/%','http://www.google.ie/%')



thanks for any help!

mike123

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2009-11-18 : 14:05:52
you could put all of those in a temp table and join on it
or, change it to AND referrerURL like '%#1%' or referrerURL like '%#2%'etc...

http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page
   

- Advertisement -