-
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 .
-
try this as it help you:
select ne.* , trunc(sysdate) - trunc(ne.hiredate) as diffr from nav_emp ne;
Cheers
/MR
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|