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

Simple Question

Status
Not open for further replies.

yu217171

Programmer
Aug 2, 2002
203
CA
I have two tables;a one-many relationship.

Table 1
1 2
1
2 3

Table 2
1 Susan
1 John
2 Judith
3 Paul

I need to display my results from table 1 as

Susan Judith
John
Judith Paul

How would I set up my join?

Keith

 
Sorry typo ...

Table 2 should look like this

Table 2
1 Susan
2 John
3 Judith
4 Paul

Hence, results should look like

Susan Judith
Susan
John Judith

 
QUESTION: second item in row 2 of Table1 is a "1"

how do you know that "1 John" in Table2 and not "1 Susan"???


Thanks

J. Kusch
 
Are each of the numbers in Table1 in seperate columns?

Thanks

J. Kusch
 
Ok I found a way of doing it. I had to reference the same table twice while on one doing an inner join and the second instance of the table (has to be aliased) and performing a LEFT OUTER JOIN.

HTH with anyone else encountering this problem.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top