gelewyc@nyct.com (george lewycky) wrote in message news:<68aecc05.0312231207.4e11e1c@posting.google.c om>...[color=blue]
> Hi everyone
>
> How can I have 2 or more SQL statements run sequentially.
>
> This is needed to synchronize a reference table which is later
> used in a PL/SQL program that I wrote also.
>
> I'm trying to automate the processes.
>
> Below are the SQL statements that I would like to run together
> using SQL*Plus, TOAD, etc ??
>
> Any ideas ??
>
> Thanks & Happy Holidays
>
> George
> -----------------------
>
>
> select count(*) from george_xref;
> /
> INSERT INTO GEORGE_XREF GEO
> select
> TRX_NUMBER,
> TRX_DATE,
> CUSTOMER_TRX_ID,
> BILL_TO_CUSTOMER_NUMBER,
> substr(bill_to_customer_name,1,25) CUSTOMER_NAME,
> PRINTING_ORIGINAL_DATE,
> PRINTING_LAST_PRINTED,
> PRINTING_OPTION,
> PRINTING_PENDING,
> PRINTING_COUNT
> FROM AR_INVOICE_HEADER_V
> WHERE TRX_NUMBER IN
> (SELECT TRX_NUMBER FROM AR_INVOICE_HEADER_V MINUS
> SELECT TRX_NUMBER FROM GEORGE_XREF);
> /
> delete from george_xref
> where bill_to_customer_number = 1404
> /
> commit;[/color]
you mis-understand Oracle's architecture. As long as you do not commit
until after both the insert and delete complete, you are fine. Data is
only visible to other users after a commit is complete. This is seen
as one transaction.
go to otn.oracle.com and read the first 10 chapters of the concepts
document. Its explained their.
now if you REALLY want them to run in parallel, submit them as jobs
with the dbms_job package. However, one will start running before the
other.