DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: sql for difference between 2 dates

  1. #11
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Originally posted by svk
    Sample :
    SQL> create table dt (d date);

    Table created.

    SQL> insert into dt select sysdate-rownum from dba_tables where rownum<101;

    100 rows created.

    SQL> commit;

    Commit complete.

    SQL> select max(d)-(sysdate+10) from dt;

    MAX(D)-(SYSDATE+10)
    -------------------
    -11.000162
    Whether or not your test is valid depends on whether "current_date" is a variable storing the sysdate or if it a column in the table period.

  2. #12
    Join Date
    Jul 2000
    Posts
    521
    Sure...I agree. I guess I assumed too much when I replaced "current_date" by "sysdate".
    svk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width