Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The question is
Select the Employee's First Name, concatenated to the Last name, separated by a space. Call the column 'Employee Name,'
the length of this employee name Length, the location of the first 'a' in the name 'A Location,' and the 5–9 characters from
the name 'Substring.' Order the results by the Employee Name using the alias.
9 rows returned.

I'm having problems doing this one. The only part I did and can't understand to do the next step was: And this part I did with help of your SQL tutorial.

SELECT FirstName + ' ' + LastName
FROM Employees;
Posted
Updated 21-Jun-16 2:27am

1 solution

You have almost completed the first portion of it... I'll give you a push in the right direction... Name a column by using the AS keyword, like this:

SQL
select FirstName + ' ' + LastName as [Employee Name]
from Employees;


The next parts you need to use the len() function, instr(), mid() and Order By.

Have a crack at it.
 
Share this answer
 
Comments
Member 10219369 20-Aug-13 15:17pm    
Thank you, I will work on that now

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900