Error Message in SQL Server 2008 code.

45 pts.
Tags:
SQL Query
SQL Server 2008 R2
SQL Server Management Studio
SSMS 2008
Hi, I am currently going through the Tutorials on SQL Server Management Studio 2008 R2.

One of the samples instructs me to run the following code:

SELECT  Mgr.EmployeeID AS MgrID, Mgr.LoginID AS Manager,  Emp.EmployeeID AS E_ID, Emp.LoginID, FROM EmployeeDemo AS Emp LEFT JOIN EmployeeDemo AS Mgr ON Emp.ManagerID = Mgr.EmployeeID ORDER BY MgrID, E_ID;

[em]When i execute the above code i get the following error message:[/em]

[strong]Msg 156, Level 15, State 1, Line 4 Incorrect syntax near the keyword 'FROM'. [/strong]

[strong]Any idea's what the problem might be?[/strong]

[strong]Thanks[/strong]

[strong]John.[/strong]

[strong][/strong]

 

Software/Hardware used:
SQL Server 2008 R2, Windows XP
ASKED: October 5, 2011  11:20 AM
UPDATED: March 31, 2012  12:36 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Remove the comma after Emp.LoginID.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following