|
Greetings!
I have three tables to join for three columns in a report, coming from MS SQL. The tables are NAMES, CARS, and BICYCLES. So I select the three tables, and do the joins in CR in the database expert.
Then for the data:
NAMES:
Bob
Steve
John
CARS:
Bob, Ford, 1999
Bob, Jaguar, 2000
Steve, Mustang, 2000
Steve, Chevy, 2001
John, Lincoln, 2004
BICYCLES:
Bob, BMX1, 1997
Bob, BMX2, 2000
Bob, BMX3, 2005
Steve, BMX1, 2004
Steve, BMX2, 2004
John, BMX3, 2006
John, BMX3, 2007
I would like the data to return:
Bob------Ford------BMX1
---------Jaguar----BMX2
-------------------BMX3
Steve----Mustang---BMX1
---------Chevy-----BMX2
John-----Lincoln---BMX3
-------------------BMX3
But instead returns:
Bob----Ford-------BMX1
------------------BMX2
-------Jaguar-----BMX1
------------------BMX2
Steve--Mustang----BMX1
------------------BMX2
-------Chevy------BMX1
------------------BMX2
etc...
and creates duplicates. how to I get rid of this?
In SQL what I would need is SELECT * FROM NAMES
LEFT OUTER JOIN CARS on NAMES.name = CARS.name
LEFT OUTER JOIN BICYCLES on NAMES.name = BICYCLES.name
but I cannot figure out how to emulate this in CR, and cannot rewrite the queries returning the data. How can I group these effectively?
Thanks
|