Connecting Tech Pros Worldwide Help | Site Map

how to see all the inserted rows of a particular date

Member
 
Join Date: Feb 2008
Posts: 88
#1: Mar 25 '08
Hi friends,

how to see all the inserted rows of a particular date of a table.

regards
rohit
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#2: Mar 25 '08

re: how to see all the inserted rows of a particular date


Quote:

Originally Posted by rohitbasu77

Hi friends,

how to see all the inserted rows of a particular date of a table.

regards
rohit

Could you post your table structure, the query that you tried for achieving your results?
Member
 
Join Date: Feb 2008
Posts: 88
#3: Mar 25 '08

re: how to see all the inserted rows of a particular date


Quote:

Originally Posted by amitpatel66

Could you post your table structure, the query that you tried for achieving your results?

say:

select * from EMP;

but it gives all the rows, i need to find only the rows inserted by today or yesterday...
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#4: Mar 26 '08

re: how to see all the inserted rows of a particular date


Quote:

Originally Posted by rohitbasu77

say:

select * from EMP;

but it gives all the rows, i need to find only the rows inserted by today or yesterday...

If you have any column that stores the date when the record was inserted only then you will be able to get the records for a particular day. Else you cannot retrieve the records based on today or tomorrow date
Member
 
Join Date: Feb 2008
Posts: 88
#5: Mar 26 '08

re: how to see all the inserted rows of a particular date


Quote:

Originally Posted by amitpatel66

If you have any column that stores the date when the record was inserted only then you will be able to get the records for a particular day. Else you cannot retrieve the records based on today or tomorrow date

ok..... but one can use SYSDATE in where clause
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#6: Mar 26 '08

re: how to see all the inserted rows of a particular date


Quote:

Originally Posted by rohitbasu77

ok..... but one can use SYSDATE in where clause

You will compare SYSDATE with Which Column?

Could you please try and post back if any issues?
Newbie
 
Join Date: Mar 2008
Posts: 3
#7: Mar 26 '08

re: how to see all the inserted rows of a particular date


See my reply at http://www.thescripts.com/forum/thread786881.html
Newbie
 
Join Date: Jul 2007
Posts: 16
#8: Mar 27 '08

re: how to see all the inserted rows of a particular date


Quote:

Originally Posted by rohitbasu77

Hi friends,

how to see all the inserted rows of a particular date of a table.

regards
rohit


Hi rohit ,

here is the query .if your table has a column insrt_ts (insert timestamp)
Expand|Select|Wrap|Line Numbers
  1.  
  2. select * from <table_name> where insrt_ts = sysdate (for todays inserted records)
  3.  
  4. select * from <table_name > where insrt_ts = sysdate -1 ( for yesterdays)
  5.  
hope this helps you .

Mala
Member
 
Join Date: Feb 2008
Posts: 88
#9: Mar 27 '08

re: how to see all the inserted rows of a particular date


Quote:

Originally Posted by Mala232

Hi rohit ,

here is the query .if your table has a column insrt_ts (insert timestamp)

select * from <table_name> where insrt_ts = sysdate (for todays inserted records)

select * from <table_name > where insrt_ts = sysdate -1 ( for yesterdays)

hope this helps you .

Mala

Thanks Mala,
The issue is resolved by Pelle...
Reply


Similar Oracle Database bytes