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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Require Solution for this SQL problem

Re: Require Solution for this SQL problem

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sat, 15 Sep 2007 17:47:39 +0200
Message-ID: <46ebfe99$0$12285$426a74cc@news.free.fr>

"Nick" <nachiket.shirwalkar_at_gmail.com> a écrit dans le message de news: 1189853205.732087.175580_at_k79g2000hse.googlegroups.com...
| Hi,
|
| I have two tables TableA and TableB. I have a stored procedure which
| runs every morning and based on some logic dumps rows from TableA to
| TableB. In Table B there are two additional colums ID and RunID. ID is
| a normal sequence applied for all rows. But the RunId should be
| constant for a run of stored proc.
|
| So for e.g. say structure of Table A and Table B
|
| Table A Table B
|
| col1 ID RunID col1
|
| Now when I run stored proc I want rows copied as below
|
| TableA TableB
|
| col1 ID RunID col1
| row1 1 1 row1
| row2 2 1 row2
|
| The next day when stored prc runs I want data as
|
| TableA TableB
|
| col1 ID RunID col1
| row1 1 1 row1
| row2 2 1 row2
| row1 3 2 row1
| row2 4 2 row2
|
| So for every run of stored proc each day I want the Run ID incremented
| only by one and ID is normal sequence which increments for allrows
| inserted.
|
| Please help.
|
| Nick
|

Don't multipost.
Follow the answers on cdo.server

Regards
Michel Cadot Received on Sat Sep 15 2007 - 10:47:39 CDT

Original text of this message

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