Many to one linking

regulatre

Member
Say for simplicity that we have two tables. One table is called shoes. It contains an index field and a description field.
Next, say we have a table called people. In the People table, there are two columns - one for work shoes, and the other for leisure shoes. We store the index of the shoe type in the People table.

How do I link the tables such that I get a row for each person, along with the descriptive shoe name for both work/leisure?

The bigger picture involves Crystal reports, and displaying each person, with the descriptive shoe names, each on the same line.

Help!?
 

gcampbell

Member
You do one join pf the people table to the shoe table for leisure and another join from the same people table buffer to the shoe table for work (with another buffer).

I'm not familiar with how Crystal Reports works but this must work ... this can be done in Progress' Report Builder.

Later,
Gordon
 

schaapie

Member
I'm quit new to Crystal, but I think you can resolve this by adding a Command in de database-expert.
Either creating a second-shoe-set and linking the second index-field (leisure), or by writing out the complete SQL you want.
 

regulatre

Member
Nice. With this concept (multiple joins) I was able to find pleanty of resources on the web. I'll post one such site for anyone who's interetsed:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=6188
Thanks again.


gcampbell said:
You do one join pf the people table to the shoe table for leisure and another join from the same people table buffer to the shoe table for work (with another buffer).

I'm not familiar with how Crystal Reports works but this must work ... this can be done in Progress' Report Builder.

Later,
Gordon
 

regulatre

Member
Thanks for the response, I'll check into Crystal commands.


schaapie said:
I'm quit new to Crystal, but I think you can resolve this by adding a Command in de database-expert.
Either creating a second-shoe-set and linking the second index-field (leisure), or by writing out the complete SQL you want.
 
Top