Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to group multiple select statments together?

Re: How to group multiple select statments together?

From: Gary Floam <floam_at_home.com>
Date: Fri, 10 Nov 2000 03:10:27 GMT
Message-ID: <3A0B9163.7A96542F@home.com>

For the first, when you want to select from multiple tables, explore a Union query.

For the second, where you are updating multiple tables, you would have to open each as a cursor and run through each table.

Hopes this helps

Gary

chuckk_at_monmouth.com wrote:
>
> All,
>
> How do I group multiple selects into a single operation (some returning
> single rows, some returning multiple rows). and keep the data
> consistent, despite an updated by another program happening in the
> middle?
>
> (I am attempting this via perl DBI:DBD Oracle module, but pl/sql
> or stored procedure would also work for me - or any other way to do
> it...)
>
> I have something I dont know how to implement:
> Scenario:
>
> Program 1:
> is selecting data from 6 tables.
> Tables 1,2,3,4 returns single rows, tables 5 & 6 returns multiple rows
>
> Program 2:
> Is updating tables 1-6, and does a commit at the end.
>
> Program 1 is in the middle of reading table 3, when program 2 does the
> commit, therefore table 4,5,6 contains the updated records, while the
> completed selects has the
> old data before the commit in tables 1,2,3.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Thu Nov 09 2000 - 21:10:27 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US