simple query help needed
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: simple query help needed

  1. #1
    Join Date
    Jun 2008
    Posts
    38

    simple query help needed

    hi,

    i have a table called nav_emp

    select * from nav_emp------->gives all the details of the table

    select trunc(sysdate) - trunc(hiredate) from nav_emp----> gives the rowwise info abt the days difference b/w each record and sysdate.

    my requiremnt: the above value should be shown alongside all the records.that is an extra column should appear beside each record indicating the days diff .

  2. #2
    Join Date
    Dec 2007
    Posts
    82
    try this as it help you:

    select ne.* , trunc(sysdate) - trunc(ne.hiredate) as diffr from nav_emp ne;

    Cheers
    /MR

  3. #3
    Join Date
    Jun 2008
    Posts
    38
    thanks it was just what i was looking for.............

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