Re: SQL QUESTION !

From: claire marcoux <cmarcoux_at_webnet.qc.ca>
Date: Wed, 02 Dec 1998 21:53:09 GMT
Message-ID: <01be1e3e$9265bfe0$f0380dd8_at_clairema>


Hi.
First you should check youe where clause, if you compare this a field in your form you must say where invoice_id = :name of block.invoice_id.

And to create a summary column, it is on your data model you just add a summary colum and reset a your invoice. I hope it is was you need?
Claire

Kenny Lim <Kennylim_at_earthlink.net> a écrit dans l'article <7443g8$agm$1_at_ash.prod.itd.earthlink.net>...
> Hi,
>
> I am kinda stuck here trying to create a row below every invoices
> number spaced and totaled. Therefore will be able to get a
> summary overview of the report. Does anyone know how to
> do it ? Please Advise.
>
> Thanks in Advance.
>
> Regards,
>
> Ken
>
> select invoice_id,
> menu_id,
> description,
> quantity,
> (price * quantity) as subtotal,
> (price*quantity * 0.085) as tax,
> (price*quantity * 0.085+price*quantity) as total
> from menus;
> where invoice_id = invoice_id
> and menu_id = menu_id;
>
> Result : (HOW DO I GET A TOTAL SUMMARIZED AT THE END OF EVERY INVOICES?!)
>
>
> INVOICE_ID MENU_ID DESCRIPTION QUANTITY SUBTOTAL TAX
> TOTAL
> ---------- --------- -------------------------



> - --------- ----- -----
> 1001 1 Peking Spareribs 1
> 9 . 77 9.8
>
> 1002 2 Peking Duck 1
> 7 .60 7.6
>
> 1003 3 Walnut Shrimp 2
> 16 1.36 17.4
>
> 1004 4 Kung Pao Chicken 1
> 7 .60 7.6
>
> 1005 4 Kung Pao Chicken 1
> 7 .60 7.6
> 1005 5 Szechuan Chicken 1
> 7 .60 7.6
>
>
> 6 rows selected.
>
>
>
>
>
Received on Wed Dec 02 1998 - 22:53:09 CET

Original text of this message