Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
declare @vid varchar(1000) = '1000000116 ,1000000117 'select * from qt_branch where cast(branch as varchar(max)) in (@vid)Pls help in thisprithvi nath pandey
bitsmed
Aged Yak Warrior
545 Posts
Posted - 2013-09-14 : 07:01:22
Try this:
declare @vid varchar(1000)='1000000116,1000000117'select * from qt_branch where ','+@vid like '%,'+cast(branch as varchar(max))+',%'