Jump to content

causarius@gmail.com

Members
  • Posts

    2
  • Joined

  • Last visited

causarius@gmail.com's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I'm shocked to see so much activity and I want to thank everyone for contributing. I have a lot of other school work and I haven't been able to get back to this question yet, but I just wanted to let you know I didn't just post and run, and that all your assistance is not in vain.As far as the PHP stuff goes...I'm a novice with SQL, I don't know jack squat about PHP. I haven't had a chance to try it, but this seems like it would be close to what I'm looking for: But instead of CURDATE, it would be SYSDATE.When I get a chance I will give it a shot and report back.
  2. I'm using Oracle 10g XE. I've looked all over for this but I can't seem to find the exact answer I'm looking for. I've seen things that "work" like this: TRUNC(sysdate) - TRUNC(emp_hiredate) But it doesn't work in a way that I understand or in a way I can format the way I want. The question goes like this:Write a query that will list the employee number, employee last name, employee first name, employee hire date, a computation of the number of years since the employee was hired up to the date you run the query and the query run date. List the computed number of years as YEARS EMPLOYED and the query run date as QUERY DATE. I don't understand how to do this. So far, this is what I have.SELECT emp_num, emp_lname, emp_fname, emp_hiredateFROM employee I know it isn't much, but I just don't understand how to do this computation. I remember my instructor saying something about needing to divide by 365 to get the correct answer, but other than that I am clueless.Any help would be greatly appreciated.
×
×
  • Create New...