Unanswered: How to convert varchar type to integer here?
Please checkout this sql command and let me know the mistake i did.
declare @found int;
set @found = 'select sid from StickyContent where StickyId='+0+' and UserId='+171
delete from StickyContent where sid = @found
i need to pass this statement from my UI i.e in a single query
i am getting this error.
"Conversion failed when converting the varchar value 'select sid from StickyContent where StickyId=' to data type int.