Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need Assistance With A Query
Message
From
16/07/2004 17:46:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00925379
Message ID:
00925382
Views:
13
One-to-many relationships can be solved as follows:
select SchedLine.Length, Details.Type;
  from SchedLine join detail on SchedLine.SchedLineId = Details.SchedLineId
>I have 2 tables:
>
>SchdLine and Details. There is a One To Many relationship from SchedLine
>into Details
>
>SchedLine has a Length field. Details has a Type field.
>
>Each SchedLine record could have multiple child records in Details with
>different Type values.
>
>
>The result set should look like:
>
>

>
> Length Type
> ----------------------
> 30 1
> 30 2
> 30 3
> .
> .
> .
> 30 16
> 60 1
> 60 2
> 60 3
> .
> .
> .
>

>
>and so on.
>
>Each record in the result set should contain a count of each type from
>Details against each Length in SchdLine.
>
>Hope that explains it.
>
>Thanks
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform