Results 1 to 1 of 1
Apr 18, 2013, 09:15 #1
- Join Date
- Jul 2006
- Augusta, Georgia, United States
- 12 Post(s)
- 3 Thread(s)
Oracle: Proper syntax for casting a list of integers into a table
I have been going through some Oracle 11g code in a C application and came across this:
SELECT * FROM TABLE(CAST (:bv1 AS DBNAME.NUM_LIST));
Could someone please explain to me how I could run this in SQL Developer directly?
These are the things I have tried without any luck:
SELECT * FROM TABLE(CAST ('1234,456,78909,90876' AS DBNAME.NUM_LIST)); SELECT * FROM TABLE(CAST (1234,456,78909,90876 AS DBNAME.NUM_LIST)); SELECT * FROM TABLE(CAST ('1234','456','78909','90876' DBNAME.NUM_LIST));
Here is the definition for the DBNAME.NUM_LIST table type:
CREATE OR REPLACE TYPE "NUM_LIST" IS TABLE OF NUMBER
Of course this is part of a much larger query and application but I am just trying to break down my current problem into the simplest of forms. Which is understanding this so I can run and perform analytics on a query including a subquery that takes this form.
ThanksThe only code I hate more than my own is everyone else's.