November 5, 2008 at 8:43 am
Use dynamic SQL to complete your query, and you can send the amount of employee you want:
Here's an example:
DECLARE @sql NVARCHAR(1000)
DECLARE @ab NVARCHAR(100)
set @ab = '''483503'',''483504'''
SET @sql = 'select * from tm_temp_empmastall where employeeid in ( ' + @ab
+ ' )'
PRINT @sql
EXEC sp_executeSQL @sql
Hope this helps,
J-F
Cheers,
J-F
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply