September 9, 2015 at 6:52 pm
Hi All! Please forgive me as I am new to learning SQL; I apologize in advance if my questions maybe a bit "Simple" to those who are experts!
I also greatly appreciate your assistance and look forward to learning a lot from the Forum Folks here! 🙂
A friend has been helping me with getting started with learning SQL and I'm working through various scenarios to help build my experience with learning SQL.
I need to create a report showing the title the first and last name of all sales representatives-
This is what I have so far but am having difficulty retrieving ONLY the "Sales Representatives" Titles.
Select Firstname, Lastname, Title
From Employees
Where ???
I'm lost after this!
I look forward to your assistance! 🙂
September 9, 2015 at 7:42 pm
Sweetbea,
Maybe you should start by reading this article:
How to post a T-SQL question on a public forum
It's impossible to answer your question as stated, because we can't see the table definitions, or inserted records...
If you can post that, answering should be simple.
September 9, 2015 at 8:16 pm
I'm sorry...I will review and follow up.
Thank you.
September 9, 2015 at 8:38 pm
Okay this is what I'm running:
Select FirstName, LastName, Title
from Employees
See attached the Results. I need know how to only retrieve records for "Sales Representatives"
Hope this is enough information. Still trying to get a hang of how everything works here!
September 9, 2015 at 10:09 pm
Sweetbee870 (9/9/2015)
Okay this is what I'm running:Select FirstName, LastName, Title
from Employees
See attached the Results. I need know how to only retrieve records for "Sales Representatives"
Hope this is enough information. Still trying to get a hang of how everything works here!
Quick suggestion
😎
/* Choose the columns to retrieve */
SELECT
E.FirstName
,E.LastName
,E.Title
/* and the source table(s), remember
always to use an alias for disambiguation
if columns with the same name exist in
more than one table */
FROM Employees E
/* search predicates or "fileter" for the
selection. */
WHERE E.Title = 'Sales Representatives';
September 9, 2015 at 11:08 pm
Sweetbee870 (9/9/2015)
Okay this is what I'm running:Select FirstName, LastName, Title
from Employees
See attached the Results. I need know how to only retrieve records for "Sales Representatives"
Hope this is enough information. Still trying to get a hang of how everything works here!
You spent more time creating and uploading the photo that you would have if you had taken the time to post data in a readily consumable format like the article suggests. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
September 9, 2015 at 11:15 pm
You are splendid!! I will give this a try! Thank you so much and sorry for the newbie question!! 😀
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply