I have created a stored procedure with an input parameter of type varchar(100).
I am using the input variable in the query below
select deptid,name , max(location)
from
emp
where
empid in (empnos);
In which the empnos is the parameter i pass to the procedure and the variable is of type varchar. Empid in the query is an interger.
If i call the procedure with values ('6762,6764') it is doing rounding of empnos as 6763 and applying a where on empid = 6763 whereaas requirement is to do where as below
select deptid,name , max(location)
from
emp
where
empid in (6762,6764);
when i pass ('6762,1000') it is doing the select on empid 6762 whereas my requirement is to get the result set for the query below.
select deptid,name , max(location)
from
emp
where
empid in (6762,1000);
Software/Hardware used:
ASKED:
March 20, 2009 3:36 AM
UPDATED:
March 20, 2009 2:16 PM