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 2000 Forums
 SQL Server Development (2000)
 In Clause

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-08-23 : 23:05:05
Kaushik writes "HI
I have a problem with in clause. If i write query like
Select * from city where cityname in('NY','LA')

It gives proper output

But if it is this way

Declare @city varchar(10)

set @city = 'NY' + "," 'LA'

Select * from city where cityname in(@city)

What is the reason and what is the solution to it

Thanks"

   

- Advertisement -