Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Inner join HELP!
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

17 Posts

Posted - 10/18/2012 :  16:09:46  Show Profile  Reply with Quote
I've been trying to figure out this problem

Write a SELECT statement that returns all columns from the Vendors table inner-joined with the
Invoices table.

so far i've gotten

ON Vendor.VendorID = Invoice.VendorID

but it's not liking Vendor.VendorID = Invoice.VendorID
I don't know another way since this is the only way they're related.

Any help helps!

A witty student

Posting Yak Master

120 Posts

Posted - 10/18/2012 :  16:19:53  Show Profile  Reply with Quote
If your table names are Vendors and Invoices then your table references need to match in the ON condition. i.e. Invoices.VendorID = Vendors.VendorID
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 10/18/2012 :  16:20:20  Show Profile  Reply with Quote
what do you mean its not liking Vendor.VendorID = Invoice.VendorID?

can you elaborate with some sample data?

SQL Server MVP

Go to Top of Page

Starting Member

17 Posts

Posted - 10/18/2012 :  17:01:29  Show Profile  Reply with Quote
I just figured it out. Supposed to be "Vendors" instead of Vendor, same with Invoices

-________________- Always a little mistake that drives me nutts.

A witty student
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000