how to see all the inserted rows of a particular date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rohitbasu77
    New Member
    • Feb 2008
    • 89

    how to see all the inserted rows of a particular date

    Hi friends,

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

    regards
    rohit
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    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?

    Comment

    • rohitbasu77
      New Member
      • Feb 2008
      • 89

      #3
      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...

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        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

        Comment

        • rohitbasu77
          New Member
          • Feb 2008
          • 89

          #5
          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

          Comment

          • amitpatel66
            Recognized Expert Top Contributor
            • Mar 2007
            • 2358

            #6
            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?

            Comment

            • PelleFork
              New Member
              • Mar 2008
              • 3

              #7
              See my reply at http://www.thescripts. com/forum/thread786881.ht ml

              Comment

              • Mala232
                New Member
                • Jul 2007
                • 16

                #8
                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)
                [code=oracle]

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

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

                hope this helps you .

                Mala
                Last edited by amitpatel66; Mar 27 '08, 06:17 AM. Reason: code tags

                Comment

                • rohitbasu77
                  New Member
                  • Feb 2008
                  • 89

                  #9
                  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...

                  Comment

                  Working...