40 pts.
 Error Message in SQL Server 2008 code.
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:
Remove the comma after Emp.LoginID.
Last Wiki Answer Submitted:  October 5, 2011  1:33 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _