Pat Friedl
|
| Posted: 04/08/2002, 7:41 AM |
|
Ok, I've got a little problem, and I'm not sure how to do it in Code Charge.
It seems that with CC, I can make a field display data from another table with a left join easily enough, but what if I'v got three tables from which I have to pull data?
For instance, I've got these three tables:
Channel:
RecID (key)
Description (varchar)
Division:
RecID (key)
Description (varchar)
Division_Map:
RecID (key)
DivisionID (foreign key - Division.RecID)
ChannelID (foregin key - Channel.RecID)
So from this schema, I can map a division to multiple channels. Don't ask me why, but the client like this type of spaghetti logic. }
Ok, so in a grid page, I'd like to display not only all the divisions, but if a division has more than one channel, display like this:
Division.RecID, Division.Description, Channel.Description(where Division_Map.DivisionID = Division.RecID & Division_Map.ChannelID = Channel.RecID)
The result would be that for each record in the division table, it would display the record, for as many channels that it has, pulling the channel descriptino from the channel table. Clear as mud?
So far, it doesn't look like I can get this complex with CodeCharge. How do you do this??? Thanks!
|
|
|
 |
Alex Alexapolsky
|
| Posted: 04/08/2002, 8:08 AM |
|
You should create your own sql statement with multiple JOINS and
put it to Form Properties/SQL/"Custom SQL"
|
|
|
 |
|