Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sysdate in oracle

Chanchal WankhadeOct 30 2012 — edited Oct 30 2012
Hi all,

We have oracle 10g On windows.

I am executing statement below and it's retriving 0 records...
SQL> select * from test where jdate=sysdate-45;

no rows selected
But when i execute the below statement it's showing records....

SQL> select * from test where jdate>sysdate-45;

     EMPNO EMPTYPE                            SALARY JDATE
---------- ------------------------------ ---------- ---------
         7 It Suport                            5500 08-OCT-12
         8 Security                             5500 08-OCT-12
         9 Information                          5500 08-OCT-12
        10 Outsource                            5500 08-OCT-12
         1 its/who/me                           5500 08-OCT-12
         2 finance                              5500 08-OCT-12
         3 Oparation                            5500 08-OCT-12
         4 IT                                   5500 08-OCT-12
         5 Broker                               5500 08-OCT-12
        25 Facility Management                  5500 08-OCT-12
        27 Source                               5500 08-OCT-12
        28 administration                       5500 08-OCT-12
        29 New                                  5500 08-OCT-12
        30 CR                                   5500 08-OCT-12
        31 Client Relation                      5500 08-OCT-12
        32 Broker                               5500 08-OCT-12

16 rows selected.
It's retriving records.


whyis not working and why > working....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 27 2012
Added on Oct 30 2012
5 comments
293 views