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
 Join question
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

33 Posts

Posted - 11/22/2006 :  09:42:03  Show Profile  Reply with Quote
Can I make a join on two columns?

I have two tables with columns

Number, ArtNo, Ware

There is just one row in each table for each combination of ArtNo and ware. And I want for each combination see if Number is the same value

Not Just a Number

15586 Posts

Posted - 11/22/2006 :  09:50:56  Show Profile  Reply with Quote
You sure about that? DDL and sample data would the hint link in my sig...BUT

SELECT l.ArtNo, l.Ware, l.Number, r.Number
FROM table1 l join table 2 r
ON l.ArtNo = r.ArtNo AND l.Ware = r.Ware



Hint: Want your questions answered fast? Follow the direction in this link

Add yourself!

Go to Top of Page

Premature Yak Congratulator

22864 Posts

Posted - 11/22/2006 :  11:32:20  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
Also Learn SQL


Failing to plan is Planning to fail
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.03 seconds. Powered By: Snitz Forums 2000