By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

MS SQL Server Management Studio

P: 1
How can I fix this?
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '.'.

USE Northwind
SELECT * FROM Employees
Employees.FirstName AS e.FirstName,
Employees.LastName AS e.LastName,
ReportsTo. FirstName AS rt.FirstName,
ReportsTo. LastName AS rt.LastName
FROM Employees e JOIN ReportsTo rt
ON e.rt=Employees JOIN.EmployeeID
Jul 24 '11 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,369
There's a lot wrong with the query string. First off, you are selecting fields in two different places. Second, when you give an alias to a table, you can no longer qualify the table with the original name. Third, you have join in there twice, the second time is extraneous and incorrect.

If you're having this much trouble with a basic SQL query, you should find a good tutorial before jumping into it.
Jul 25 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.