declare @currentGroup varchar(20),@SQL varchar(max)
set @currentGroup = '''003'',''004'''
select @currentGroup
set @SQL = N'SELECT count(*) from [YOURTABLE] where GRNBR in (' + @currentGroup + ')'
exec (@SQL)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment