This is homework.
Here is the problem: Produce a list of employee last name, first name and department name. Use appropriate, user friendly column aliases.
This is from the tables DEMO.EMPLOYEE
and DEMO.DEPARTMENT
. The relevant column names are LAST_NAME, FIRST_NAME, DEPARTMENT_ID
(from DEMO.EMPLOYEE
) and DEPARTMENT_ID, NAME
from DEMO.DEPARTMENT
.
As you can see, I need to have the last and first name columns from DEMO.EMPLOYEE
and use the department id column to look up the department name in DEMO.DEPARTMENT
. I will use the SELECT x AS y
command to give the columns good aliases but I can't figure out how to reference the columns to each other. I tried the REPLACE
command, but I couldn't get that to work and I couldn't find anything else. Any help would be appreciated.
iamthesgt 0 Junior Poster
hfx642
iamthesgt 0 Junior Poster
debasisdas 580 Posting Genius Featured Poster
iamthesgt 0 Junior Poster
hfx642
iamthesgt 0 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.