Thread: SQL Server
View Single Post
  #1 (permalink)  
Old 04-07-2008, 06:14 PM
Mayank Tripathi
 
Posts: n/a
Thumbs up ANY dialect question:

SQL Server


Can u plz solve the below mentioned query.


use pubs
declare @String varchar(100)
set @String = '''CA'',''KS'',''TN'',''OR'''

print @String

select * from dbo.authors where state in (@String )


The select statement is no displaying data. Where as when we print the value of @String, it willcome correct, but with select statement it is not working.
Plz resolve this for me.
Reply With Quote

ANSWER(S):