Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combination records 1

Status
Not open for further replies.

manmaria

Technical User
Aug 8, 2003
286
US
I have a table with data

A, DATE
B, DATE
C,DATE

Here DATE is irrelavant but I added to show how the data might look like.

I want to see the data like
A,B
A,C
B,A
B,C
C,A
C,B

How do I do that?

TIA
 
Code:
SELECT
   T1.Col,
   T2.Col
FROM
   Table T1
   CROSS JOIN Table T2

[COLOR=black #e0e0e0]For SQL and technical ideas, visit my blog, Squared Thoughts.

[sub]The best part about anything that has cheese is the cheese.[/sub][/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top