Home » SQL & PL/SQL » SQL & PL/SQL » Is this Possible
icon2.gif  Is this Possible [message #206656] Fri, 01 December 2006 00:37 Go to next message
chmlaeeque
Messages: 59
Registered: September 2006
Member
Hi
i have a table having fields ( ddate,dname,dval ) having data
ddate dname dval
23/12/06 John 5000
20/11/06 Ali 6000
01/11/06 Imran 10000

my question is i can view data of any date as inserted, but is there anyway that i can view data inserted in which date of sql means sysdate in which the data is inserted bcz the ddate is the field where i insert date manually,
Re: Is this Possible [message #206658 is a reply to message #206656] Fri, 01 December 2006 00:45 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Not if there's no such column in the table. In another words, alter table and add 'insert_date' column, write a database trigger which will populate this column whenever a new record gets inserted (or even updated). Existing records will have this column set to NULL (or some other 'default' date), but you'll have to do it manually.
Re: Is this Possible [message #207136 is a reply to message #206656] Mon, 04 December 2006 04:35 Go to previous message
Ferrarist
Messages: 29
Registered: March 2006
Location: Netherlands - Den Haag
Junior Member
Or if you are in the lucky position of owning the headstart utility package, you could add the journalization fields:
CREATION_DATE, CREATED_BY, LAST_UPDATE_DATE, LAST_UPDATED_BY to all (or some) of your tables.
Previous Topic: Getting OS info in PLSQL
Next Topic: Materialized view refreshed through DBlink
Goto Forum:
  


Current Time: Tue Dec 06 06:26:42 CST 2016

Total time taken to generate the page: 0.09004 seconds