Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Tyecom
Starting Member
12 Posts |
Posted - 2011-04-07 : 00:20:45
|
I new at SQL and is try to query multiple tables in the Northwind database. I created a backup to the "employees" table and created a query to find rows that have different values. That part seems to work ok, but I also want to query a third table "customers" also, but keep getting syntax errors. Please see syntax below:Select EmployeeID, LastName, FirstName, City, Region, ExtensionFROM dbo.Employees, dbo.CustomersWHERE NOT EXISTS (SELECT 1 FROM dbo.Employeesbk WHERE dbo.Employees.EmployeeID = dbo.Employeesbk.EmployeeID AND dbo.Employees.LastName = dbo.Employeesbk.LastNameAND dbo.Employees.FirstName = dbo.Employeesbk.FirstNameAND dbo.Employees.City = dbo.Employeesbk.CityAND dbo.Employees.Region = dbo.Employeesbk.RegionAND dbo.Employees.Extension = dbo.Employeesbk.Extension)AND Select * from customers where customerid = 'frank'Thank you in advance for you help! |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-04-07 : 01:12:22
|
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=159153 No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|