473,396 Members | 1,773 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,396 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 6887
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.