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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with joining two tables

Status
Not open for further replies.

liuk

Programmer
Jan 16, 2006
54
IT
Hi
I have a "simple" problem with joining two tables.

These may be my tables

TABLE #1 TABLE#2
Id Descr Id Descr
1 A 1 A
1 A 2 B

when i join them i'd like to get :
RESULT TABLE
Id Descr
1 A
2 B


but when table are :
TABLE #1 TABLE#2
Id Descr Id Descr
1 A 1 A
1 A 1 A

i must get
RESULT TABLE
Id Descr
1 A
1 A


I hope this is clear.
How can i get this?
 
Code:
select * from TABLE#2

I don't see how joining is going to get you different results [ponder]

-kaht

[small] <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>[/small]
[banghead] [small](He's back)[/small]
 
That's right,
but in which way can i get those different results?
 
What different results?

Look at the results you WANT. Then look at your Table #2. As Kaht said, it's the same thing. You don't need Table #1 at all.

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top