We help IT Professionals succeed at work.
Get Started

How to do the following in Oracle?

kosenrufu
kosenrufu asked
on
347 Views
Last Modified: 2012-05-11
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?
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE