Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

sql query question

  • 24-01-2007 9:25am
    #1
    Registered Users, Registered Users 2 Posts: 1,073 ✭✭✭


    hi guys
    i am wondering why the last line of code in the example below is neccessary
    thanks ed

    5) Write the SQL script to determine how many years an employee has worked
    in the company (emp table)

    Select ename "Name", hiredate ,round((months_between(sysdate,hiredate))/12) "Years in company"
    From emp
    Where ename = ‘&Name’;


Comments

  • Registered Users, Registered Users 2 Posts: 6,236 ✭✭✭Idleater


    hi guys
    i am wondering why the last line of code in the example below is neccessary
    thanks ed

    5) Write the SQL script to determine how many years an employee has worked
    in the company (emp table)

    Select ename "Name", hiredate ,round((months_between(sysdate,hiredate))/12) "Years in company"
    From emp
    Where ename = ‘&Name’;

    if you are talking about Where ename = ‘&Name’, then it should be retrieving the row that corresponds to the employee name that you pass in in the variable Name.

    eg where ename='jimmy murphy'

    L.


Advertisement