Allen Pitts
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_M KT
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
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_M
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
What tool do you or your DBA use to execute the script ?
ASKER
I execute the script in Oracle SQL Developer V 3.1.07
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You already found it.