Tuesday, November 19, 2013

Simple Script to return Table from CSV in Oracle

That's it...in T-SQL a 'select ... where someval...in @tablevar' can be over int or string. But in Oracle the IN will only work over number values, thus we must cast TO_NUMBER. That was fun =).

SELECT TO_NUMBER(column_value) FROM XMLTABLE(<csv_string>)

No comments:

Post a Comment