I'm currently taking an SQL class and its all being done on MS Access. I've done well so far but have now hit a section where I am stuck.
The question on the lab was:
"List employee id and the names of all employees. display the names as first initial then last name followed by a period after the first initial. In acess, you will need to change the data to upper case. name the formatted column employee_name. sort rows by employee_id"
Below is what I have done this far and the bottom section is where I'm stuck. any help or recommendations are greatly welcomed.
STEP 1:
alter table l_employees add column employee_name text(25);
STEP 2:
select employee_id, mid(First_name,1,1) & '. ' & UCase(last_name) as employee_name
from l_employees;
STEP 3:
Save the query like a view as names_view
STEP 4:
insert into l_employees (employee_name)
select employee_id, employee_name
from names_view f, l_employees l
where l.employee_id = f.employee_id
order by employee_id;
Step 4 is the portion I can not get to work?
The question on the lab was:
"List employee id and the names of all employees. display the names as first initial then last name followed by a period after the first initial. In acess, you will need to change the data to upper case. name the formatted column employee_name. sort rows by employee_id"
Below is what I have done this far and the bottom section is where I'm stuck. any help or recommendations are greatly welcomed.
STEP 1:
alter table l_employees add column employee_name text(25);
STEP 2:
select employee_id, mid(First_name,1,1) & '. ' & UCase(last_name) as employee_name
from l_employees;
STEP 3:
Save the query like a view as names_view
STEP 4:
insert into l_employees (employee_name)
select employee_id, employee_name
from names_view f, l_employees l
where l.employee_id = f.employee_id
order by employee_id;
Step 4 is the portion I can not get to work?
Last edited: