Hi there,
I have a webpage that calls a storedProcedure with @temp parameter
ex: @temp = '1,2,3,4'
--********** START PROCEDURE ************************
create proc usp_tt (@temp as varchar(12))
select *
from t1
inner join t2
on t1.ID = t2.ID
and t2.col in (Case
when @temp = '0' then
t2.col
else
(select int_col
from call_function_that_returns_rows_for_given_string(@temp))
End)
--**********************************
NOTE:
"call_function_that_returns_rows_for_given_string" this function returns rows for a given comma delimited string i.e. '1,2,3,4,5,6' into
int_col
1
2
3
4
5
6
I am breaking my head over this....
I need a fresh set of eyes and brain to look at this.... may be there is a simple solution
thanks a lot,
_ub
I have a webpage that calls a storedProcedure with @temp parameter
ex: @temp = '1,2,3,4'
--********** START PROCEDURE ************************
create proc usp_tt (@temp as varchar(12))
select *
from t1
inner join t2
on t1.ID = t2.ID
and t2.col in (Case
when @temp = '0' then
t2.col
else
(select int_col
from call_function_that_returns_rows_for_given_string(@temp))
End)
--**********************************
NOTE:
"call_function_that_returns_rows_for_given_string" this function returns rows for a given comma delimited string i.e. '1,2,3,4,5,6' into
int_col
1
2
3
4
5
6
I am breaking my head over this....
I need a fresh set of eyes and brain to look at this.... may be there is a simple solution
thanks a lot,
_ub