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

MS Access Relationships -Help!

Options
  • 14-12-2013 10:28pm
    #1
    Registered Users Posts: 4,030 ✭✭✭


    I desperately need help with a project that is due in tomorrow.

    I'll try explain as best i can but can elaborate if I havent given enough info for anyone to help.

    I have two tables in access as follows:

    Employee (contains fields EmployeeID, Firstname, Lastname, JobTitle, Startdate, Salary, Dept, Manager)

    Appraisals (AppraisalId, Employee, Appraiser, Date, Rise)

    The fields Lastname& Firstname, Manager, Employee and Appraiser all refer to the same people.

    I have been asked to firstly use SQL for lookups from the appraisal table to the employee able using select employeeid, lastname&','&firstname from employee by order of 2. This gives me a dropdown list of all the staff. I think its meant to convert the employee id's in my appraisal table to names but i had to manually change them so I know I've done something wrong.

    Can anyone help...
    thank you...desperado :o


Comments

  • Registered Users Posts: 329 ✭✭Cathalog


    I'm finding it a little difficult to understand the question being asked. I'd definitely recommend you look at it again and rephrase it :)

    You say that you think "its meant to convert the employee id's in my appraisal table to names". I can help you with doing this, but I can't guarantee it's the answer to the question, because I don't understand it :P

    In order to list every row in the Appraisals table, but show the employee name instead of the employee ID, both tables have to be used - I like using the INNER JOIN method, but you can also use a subquery method.

    Here's the SQL...
    SELECT AppraisalId, Lastname&", "&firstname, Appraiser, Date, Rise
    FROM Appraisals INNER JOIN Employee on Appraisals.Employee = Employee.EmployeeID;
    

    Like I said, I have no idea if that's the question being asked, so please test the code I gave you and check the results.


Advertisement