Avatar of Allen Pitts
Allen Pitts
Flag for United States of America asked on

PL/SQL Two statements

Hello expert,

I need to go to the DBA with a script to delete rows in two tables.

Wrote

DELETE FROM J3131_ACP_D_NOTE_SEGMENT
where NOTE_ID = 798105 and SEGMENT_ID in (2359467, 2359468, 2359469);

DELETE FROM J3131_ACP_D_NOTE_SEGMENT_MKT
where NOTE_ID = 798105 and SEGMENT_ID in (2359467, 2359468, 2359469);

COMMIT;

But it only executes the first statement

Have tried running the two statements in separate queries with positive
result. But when combined only the first goes.

Was told by the DB expert that the semicolon is needed after
the first statement, Is he wrong?

Thanks.

Allen in Dallas
Oracle Database

Avatar of undefined
Last Comment
flow01

8/22/2022 - Mon
flow01

What tool do you or your DBA use to execute the script ?
Allen Pitts

ASKER
I execute the script in Oracle SQL Developer V 3.1.07
Allen Pitts

ASKER
Hello flow01,

Figured it out.
I clicked the green triangle icon (Run Statement).
But I should have been clicking the icon next to the Run Statement
icon which is the Run Script (looks like a piece of paper with a green triangle).

This made both statements run.

Thanks.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
flow01

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
flow01

You already found it.