Viewing 7 posts - 1 through 7 (of 7 total)
how can i do it without using dynamic sql
November 6, 2008 at 9:05 am
When i execute the following code.
declare @ab varchar (100)
declare @cSQL varchar (200)
set @ab='''483503'',''483504'''
print @ab
SET @cSQL = 'select * from tm_temp_empmastall where employeeid in...
November 5, 2008 at 8:47 am
thanks for qiick reply
@ab will have the all employeeid selected in reporting service interface.
and then i want to pass the @ab to stored procedure to give...
November 5, 2008 at 8:01 am
i want multiple employeeids in @ab
set @ab='483503,483504'
and then
select * from tm_temp_empmastall where employeeid in (@ab)
November 5, 2008 at 7:58 am
thanks for quick reply.
When i am converting a string into datetime for comparing it with a column which is datetime why is it giving error,
November 5, 2008 at 7:43 am
This query works.
select * from tm_temp_empmastall where employeeid='483503'
and
firstly set @ab='''483503''' is creating a variable who value is '483503'
so why
select * from tm_temp_empmastall where employeeid=@ab
doesn't...
November 5, 2008 at 6:54 am
You are right .
But query mentioned below works.
select * from tm_temp_empmastall where employeeid='483503'
November 5, 2008 at 6:49 am
Viewing 7 posts - 1 through 7 (of 7 total)