Thread
:
SQL Server
View Single Post
#
2
(
permalink
)
08-26-2008, 11:12 AM
SandeshSegu
Junior Member
Join Date: Aug 2008
Location: Bangalore, INDIA
Posts: 6
ANY
answer.
Re: SQL Server
Hi,
Please use the below Query...
Quote:
use pubs
declare @String varchar(100)
Declare @SQL varchar(200)
set @String = '''CA'',''KS'',''TN'',''OR'''
Set @SQL= 'select * from dbo.authors where state in ('+@String + ')'
Print @SQL
exec (@SQL)
__________________
Thanks
Sandesh S
http://sanssql.blogspot.com/
SandeshSegu
View Public Profile
Send a private message to SandeshSegu
Visit SandeshSegu's homepage!
Find all posts by SandeshSegu