Subject Re: [IBO] complex master details (2nd post)
Author Helen Borrie
At 03:52 PM 17/08/2004 +0000, you wrote:


>hello
>
>Iam about to make a complex master details relationship, but i dont know
>how to do it. Here is the sql of my master dataset
>
>select d.location,
>sum(m.qty) qty, sum(m.subtotal)amount, sum(m.qty*d2.net_weight) kilos
>from invoice_details m left join invoice d on d.id = m.master_key
>left join products d2 on d2.id = m.product_id
>where d.status != 'CAN' and d.sales_type = 'OLT' and d.invoice_date =
>:invoice_date
>group by d.location
>
>and here is the sql of my detail dataset
>
>select d.location,
>(select description from products d4 where d4.product_type =
>d2.product_type) description,
>sum(m.qty) qty
>from invoice_details m left join invoice d on d.id = m.master_key
>left join products d2 on d2.id = m.product_id
>where d.status != 'CAN' and d.sales_type = 'OLT' and d.invoice_date =
>:invoice_date and d.location = :location
>group by d.location, d2.product_type
>
>I have no idea what shall I put on the masterlinks properties of the
>detail dataset or should I use masterparamlinks but how? Can anybody
>help me?

I doubt it. There is no way you could make a master-detail relationship
out of this.

Helen