PL/SQL (MOSC)

MOSC Banner

PL/SQL Block to insert to tableB with conditions from tableA

edited Jan 21, 2014 10:55PM in PL/SQL (MOSC) 3 commentsAnswered
Hi Gurus,
Kindly advise on the scenario below,

I need to insert data from tableA to another tableB with special condition on one of the column in the tableA.
E.g ColA is the condition column that would likely contain 'Add' , 'Subtract', 'Multiply'.
Before inserting data from tableA into tableB, I need to look first on the ColA of tableA - the condition, so I would know what is to apply for example.
For every record  If tableA.ColA is 'Add' Then tableB.ColB is tableA.ColC || tableA.ColD
                         If tableA.ColA is 'Subtract' Then tableB.ColE is tableA.ColF || tableA.ColG ....

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center