Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sum of Details on Master
Michael Ho wrote:
>
> Nico Vandenbroucke wrote:
> >
> > Any1 who knows how to handle this problem?
> >
> > The database holds two tables ('INVOICE' (master) and 'INVOICELINE' (detail)).
> > Every Invoice line has an amount.
> >
> > We would like to keep the total amount of the invoice lines in the Invoice
> > table.
>
> Doing this is not difficult. But the same old question is why you need
> to do this ?
> 'Cause it may cause some problem you may not expected,
> like dead lock or on-line performance degradation.
> You can consider other design options like summary views or separate
> summary queries.
> These could be more controllable and more economic too.
>
> eg. You can try a non-based-table item in Master Block and do a summary
> on POST_QUERY
>
> In design point of view, table definition should be your last area to
> touch for screen design.
You can't summary in POST-QUERY trigger, because you form may fetch into
buffers only fixed number of records (see Record Buffered, Record
Fetched properties for you block), and you trigger count only this
records.
You can use POST-SELECT trigger to calc you formula (sums or others)
with :System.Last_Query variable. If you want see only count of raws in
detail block, you can use ON-COUNT trigger & value of Count_Query
build-in.
Received on Wed Apr 09 1997 - 00:00:00 CDT
![]() |
![]() |