troubleshooting Question

How to do the following in Oracle?

Avatar of kosenrufu
kosenrufu asked on
Oracle Database
8 Comments1 Solution350 ViewsLast Modified:
I have this:

DROP TABLE TempTbl;        



CREATE GLOBAL TEMPORARY TABLE TempTbl (
  UPC_CD  NUMBER
) ON COMMIT DELETE ROWS;

store string to array named arrVal
arrVal () = Split(1234,344,334434,33444,",")

For i =0 to Ubound(arrVal ())

INSERT INTO  TempTbl(UPC_CD) VALUES(arrVal (i));

Next i

SELECT * FROM TempTbl;


I want to store a string of numbers into an array and then loop through the array and append the numbers to the temporary table. I want to detect if the temporary table exists, if not then create, else drop and then create.

How can this be done?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros