var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: CSV within a field
Hello everyone -
I have a field that has a series of values seperated by commas...
so the select statement returns 'OP,ER,IP'
as the value of that field.
I need to perform a query against a table that
can have one of the values from above in a field.
I understand the in clause works on a statement like this...
select adt_lkey from tbladt where adt_dtdischarge is null and adt_szpatienttype in ('ER', 'OP', 'IP')
but my query for the IN returns a value like this....
'OP,ER,IP' as a string.
This fails in the IN statement above query.
I have tried to do a replace on the comma with a single quote
and comma so the string looks like this....
' 'ER', 'OP', 'IP' ' but - again it is within a string,
and that seems to fail as well.
Is there a way to break out the values??
I was thinking of a temporary table, but i don't know if thats the way to go??
anyone have a suggestion??