I have 3 tables I am working with: Customers, Loans and References. I can do a join of Customers and Loans based on the CustomerId to get the info I want so far.
LNAME, FNAME, LOAN AMT, ETC
Now, there is a table called "references" This table has 1-6 references per Customer. Each reference takes 1 row in the table. I want to end up with:
LNAME, FNAME, LOAN AMT, ETC, REF1NAME, REF1PHONE, REF2NAME, REF2PHONE, REF3NAME, REF3PHONE and so on.
Can this be done with a looping query, nested query or what?