I see the problem. I think the decision to build query dynamically is a wrong one. I see that fn_split function is mentioned, so your query should be somehting like
select * from myTable inner join dbo.fn_split(@Roles) RoleList on myTable.Role = RoleList.Col1 (if you're using the function showed here by the previous poster). If you use the function from my link, then it would be Item instead of Col1 (I think Item is
better name for the column, BTW).
Hi,
I am not using fn_split right now..
can you give any clues why I am getting this error?
ERROR
Conversion failed when converting the varchar value 'SELECT Companyname, Role, Moreaboutjob, candidate,Experience,Location,salarymin,salarymax,Interviewdate,postdate FROM callcenter where Location Like '%mumbai%' and DATEDIFF(Day, postdate, getdate(
) ) <='' to data type int.
closeguy2005
Participant
887 Points
1746 Posts
Re: problem in pattern matching..
Sep 18, 2008 06:15 PM|LINK
Hi,
I am not using fn_split right now..
can you give any clues why I am getting this error?
ERROR
Conversion failed when converting the varchar value 'SELECT Companyname, Role, Moreaboutjob, candidate,Experience,Location,salarymin,salarymax,Interviewdate,postdate FROM callcenter where Location Like '%mumbai%' and DATEDIFF(Day, postdate, getdate( ) ) <='' to data type int.