473,327 Members | 2,118 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

combining several SQL statements to run sequentially??????

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;
Jul 19 '05 #1
2 6877
george lewycky wrote:
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;


Seems pretty sequential to me - what's parallel?
--
Merry Christmas and a Happy New Year,
Frank van Bortel

Jul 19 '05 #2
ge*****@nyct.com (george lewycky) wrote in message news:<68*************************@posting.google.c om>...
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;

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.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: alwayswinter | last post by:
I currently have a form where a user can enter results from a genetic test. I also have a pool of summaries that would correspond to different results that a user would enter into the form. I...
7
by: Barry | last post by:
Hi all, I've noticed a strange error on my website. When I print a capital letter P with a dot above, using & #7766; it appears correctly, but when I use P& #0775 it doesn't. The following...
2
by: SomeDude | last post by:
Lo group, I am wondering if there is a way of combining two SELECT statements into a single query. Here's the obligatory example to clarify things: SELECT id WHERE name=mike SELECT bills...
4
by: DG | last post by:
Hi, Can anyone advise how to execute multiple statements in a single query batch. For example- update customers set customer_name = 'Smith' where customer_name = 'Smyth'; select * from...
1
by: ravi | last post by:
I have created the following interest to calculate the interest for the following currency pairs. I have tried to combine them in macros using conditions but the next query that is run in the macro...
2
by: Tom_B | last post by:
I need to combine several .wav files into one file, and do this hands-off in an automated environment. Any ideas on how this could be done? What methods or classes are available for reading...
1
by: Steve Schroeder | last post by:
If I need to combine a group of files (up to over a 100 even), and the do a search/replace on a static string...is StreamReader my best most effective option? Still working my around VB.Net. I'm...
0
by: Gabriel Genellina | last post by:
En Fri, 02 May 2008 17:45:57 -0300, CRAIG DALTON <CXDALTON@sentara.com> escribió: Except the spurious + in join(r+,files), and the usage of "files" denoting a single file name, the code looks...
2
by: george lewycky | last post by:
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.