Please only take this question if you are fluent in SQL Serv

Please only take this question if you are fluent in SQL Server.

Your friend is frustrated by a join, and is sure it\'s something simple. The error is \"The multi-part identifier \"C.CustomerId\" could not be bound.\"

Can you spot the trouble?

Select C.CustomerId, C.CompanyName, O.OrderId, O.OrderDate

From Customers Cust

Left Join Orders O

ON C.CustomerId = O.CustomerId

Order By

C. CustomerId

Note: think this might be Alias related

Solution

Select C.CustomerId, C.CompanyName, O.OrderId, O.OrderDate

From Customers C

Left Join Orders O

ON C.CustomerId = O.CustomerId

Order By

C. CustomerId

Used C instead of Cust in query

Please only take this question if you are fluent in SQL Server. Your friend is frustrated by a join, and is sure it\'s something simple. The error is \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site