![]() |
|
|
#11 |
|
Junior Member
Join Date: Nov 2004
Posts: 13
|
Re: Weird Join...Help Please
I have two records (rubble and johnsen).
(all garbage data now) the first result below is correct, and the last result is correct. id, last, first, investor1, investor2 1, Rubble, Betty, GMAC, USBank 2, Johnsen, Suzy, GMAC, USBank 1, Rubble, Betty, USBank, USBank 2, Johnsen, Suzy, USBank, GMAC |
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Jul 2004
Posts: 167
|
Re: Weird Join...Help Please
I mean the SELECT query. What exactly is the query?
|
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Nov 2004
Posts: 13
|
Re: Weird Join...Help Please
oops...sorry...
Code:
thanks again for all your help i took out as much as i can to simplify it. the above just returns the investor names Last edited by radox : 09-21-2005 at 09:18 PM. |
|
|
|
|
|
#14 |
|
Senior Member
Join Date: Jul 2004
Posts: 167
|
Re: Weird Join...Help Please
Not much time right now to answer you but one more question. Did you add a primary key to the second table? Meaning stepclientid
|
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Nov 2004
Posts: 13
|
Re: Weird Join...Help Please
yes. i always have a primary key in every table simply called 'id'
|
|
|
|
|
|
#16 |
|
Junior Member
Join Date: Nov 2004
Posts: 13
|
Re: Weird Join...Help Please
I finally got it. I had the clients table and contacts tables backwards.
Code:
should be Code:
thanks sooooo much for your help. i hope we both learned from this. i'll never forget how to joing two foreign keys for sure... |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is the "right" join for the job? | Azkaban | Database Design | 1 | 02-25-2005 02:36 PM |
| Cross dependency found in OUTER JOIN SQL | rjmthezonenet | SQL syntax | 0 | 12-05-2004 04:41 PM |
| help with join | shaunperry | SQL syntax | 0 | 10-07-2004 06:22 AM |