Basic SQL Query, I am newbie

Posted by user3530547 on Stack Overflow See other posts from Stack Overflow or by user3530547
Published on 2014-08-25T03:16:19Z Indexed on 2014/08/25 4:20 UTC
Read the original article Hit count: 138

Filed under:
|

I just started my database and query class on Monday. We met on Monday and just went over the syllabus, and on Wednesday the network at school was down so we couldn't even do the power point lecture. Right now I am working on my first homework assignment and I am almost finished but I am having trouble on one question.

Here is is...

Write a SELECT statement that returns one column from the Customers table named FullName that joins the LastName and FirstName columns.
Format the columns with the last name, a comma, a space, and the first name like this:
Doe, John Sort the result set by last name in ascending sequence.
Return only the contacts whose last name begins with letters from M to Z.

Here is what I have so far...

USE md0577283
SELECT FirstName,LastName
FROM Customers
ORDER BY LastName,FirstName

My question is how do I format is Lastname, FirstName like the professor wants and how do I only select names M-Z?

If someone could point me in the right direction I would greatly appreciate it.

Thank you.

PS With all do respect, I didn't ask for the answer I asked for a nudge in the right direction so why the down vote guys?

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server