I want to use my result of function e.g. 'S500,S600,S700,S800'
in a subquery in another script like:
where dept_no in (my result of function)
So I want to convert my string result to be like this ('S500','S600','S700','S800')
.
I tried to do this with dynamic SQL but I can't get it to work.