help - how to get different values from same table
I have 2 tables --> User and Car. Both have unique ids and each user has 2 cars.
for example,
Jim has Ford and Honda
Jill has Toyota and Subara
Jack has Toyota and Honda
John has Ford and Ford
So I am storing the 2 car ids in the user table. I am not creating any bridge table.
So in the report I want the user and their car. But I get the following report on the above data:
Jim -- Ford
Jill -- Toyota
Jack -- Toyota
John -- Ford -- Ford
Notice, that the first 3 records just display first car. The forth record displays both cars.
In the crystal report, I did like this in the "SQL Expression Fields" to get the name of first car:
(SELECT CAR.NAME WHERE USER.FIRST_CAR_ID = CAR.CAR_ID)
to get the name of second car:
(select CAR.NAME where USER.SECOND_CAR_ID = CAR.CAR_ID)
Kindly help me to resolve this problem.
Thanks.

