Thanks friends it's solved.
This test is from my test Database:
14:30:55 TRAIN TRAIN1> alter table jobs add date_added
date ;
Table altered.
15:16:49 TRAIN TRAIN1> desc jobs
Name Null? Type
----------------------------------------- -------- ------
----------------------
JOB_CODE
VARCHAR2(10)
WAGE_CLASS
VARCHAR2(2)
CUSTOMER
VARCHAR2(30)
MINIMUM_SALARY NUMBER
(10)
DATE_ADDED DATE
14:54:51 TRAIN TRAIN1> update jobs set DATE_ADDED=
(sysdate -7);
16 rows updated.
14:55:30 TRAIN TRAIN1> select * from jobs ;
JOB_CODE WA CUSTOMER
MINIMUM_SALARY DATE_ADDE
---------- -- ------------------------------ -------------
- ---------
1 Jalil
15000 21-FEB-02
2 Pirathong
20000 21-FEB-02
3 NINI
30000 21-FEB-02
5 DODO
40000 21-FEB-02
....
16 rows selected.
15:00:04 TRAIN TRAIN1> create trigger
how_to_see_updated_rows
15:00:05 2 before update of CUSTOMER on jobs
15:00:05 3 for each row
15:00:06 4 begin
15:00:06 5 :new.DATE_ADDED:=sysdate;
15:00:06 6 end;
15:00:07 7 /
Trigger created.
15:00:08 TRAIN TRAIN1> update jobs set
CUSTOMER='Manpreet' where CUSTOMER='NINI' ;
1 row updated.
15:00:17 TRAIN TRAIN1> select * from jobs ;
JOB_CODE WA CUSTOMER
MINIMUM_SALARY DATE_ADDE
---------- -- ------------------------------ -------------
- ---------
1 Jalil
15000 21-FEB-02
2 Pirathong
20000 21-FEB-02
3 Manpreet
30000 28-FEB-02
5 DODO
40000 21-FEB-02
....
16 rows selected.
15:04:08 TRAIN TRAIN1> select * from jobs where
DATE_ADDED >(sysdate -7);
JOB_CODE WA CUSTOMER
MINIMUM_SALARY DATE_ADDE
---------- -- ------------------------------ -------------
- ---------
3 Manpreet
30000 28-FEB-02
> ---------- Initial message -----------
>
> From : "David Christopher" <[Email Address Removed] To : "LazyDBA.com Discussion"
<[Email Address Removed] Cc :
> Date : Thu, 28 Feb 2002 10:23:16 -0500
> Subject : Re: Re:Can't insert rowid!!!
>
> Why don't you add a date column to the table and create
a after insert
> trigger to insert the sysdate into it. Then the query
>
> select * from table where date_col > (sysdate-7) will
give the rows you
> want.
>
> ----- Original Message -----
> From: "Jalil Zabourdine"
<jalil.[Email Address Removed] To: "LazyDBA.com Discussion" <[Email Address Removed] Sent: Thursday, February 28, 2002 6:16 AM
> Subject: Re:Can't insert rowid!!!
>
>
> Nick,
> Good Question!
> I was satisfied with your reply yesterday...Thanks for
> that. what I am trying to achieve here is :
> 1/ We are updating a table once a week say 1000 rows
> there will no additional rows will be inserted.
> 2/ I want to select two columns(customer name including
> rowid) to know howmany rows have beed updated since the
> previous week.
> Any idea how to achive this? which is the best way to do
> it?
>
> Thanks in advance.
> -Jalil
>
--------------
Profitez de l'offre spéciale Tiscali Liberty Surf !
50% de temps en plus pendant 3 mois sur tous les forfaits Internet.
http://register.libertysurf.fr/subscribe_fr/signup.php3
Oracle LazyDBA home page