Re: [Emerald] project for the day

Kenneth Gustav Eitenmiller Jr ( keitenmiller@hughestech.net )
Mon, 7 Feb 2000 12:16:43 -0600

Dale,
I am getting this:

Msg 209, Level 16, State 1
Ambiguous column name amount
Msg 209, Level 16, State 1
Ambiguous column name tax
Msg 209, Level 16, State 1
Ambiguous column name tax2
Msg 209, Level 16, State 1
Ambiguous column name amount
Msg 209, Level 16, State 1
Ambiguous column name tax
Msg 209, Level 16, State 1
Ambiguous column name tax2

Ken

----- Original Message -----
From: "Dale E. Reed Jr." <daler@iea-software.com>
To: <emerald@iea-software.com>
Sent: Monday, February 07, 2000 12:01
Subject: Re: [Emerald] project for the day

> > Kenneth Gustav Eitenmiller Jr wrote:
> >
> > Maybe this will explain it better...
>
> Have you seen this report?
>
> ftp://ftp.iea-software.com/Emerald/reports/cr60/tax_sum.rpt
>
> It does a lot of what you want.
>
> > SQL Query follows....kinda
> >
> > /* tax summary for month by taxid */
> > set nocount on
> > declare @begindate char(10), @enddate char(10)
> >
> > select @begindate = '1/1/2000'
> > select @enddate = '1/31/2000'
> >
> > set nocount off
>
> A side note:
>
> Tax is tracked at the line item detail, rather than the invoice
> detail (so some items are taxable and some are not).
> This is just a rough guess and hasn't been double checked:
>
> Select TaxID, beforetax=sum(amount*quantity), taxes=sum(tax)+sum(tax2),
> total=sum(amount*quantity)+sum(tax)+sum(tax2)
> From Invoices i, InvoiveItems ii
> Where i.InvoiceID = ii.InvoiceID
> and i.Type <> "VOID"
> and i.Date between @begindate and @enddate
> Group By TaxID
> Order By TaxID
>
> > print discription from virtual table (tax1)
> > print "Amount Invoiced before taxes =" amountsberforetax
> > print "Amount Invoiced taxes only =" bothtaxes
> > print "Amount Invoiced Total =" amounts
>
>
> --
>
> Dale E. Reed Jr. Emerald and RadiusNT
> __________________________________________
> IEA Software, Inc. www.iea-software.com
>
> For more information about this list (including removal) go to:
> http://www.iea-software.com/support/maillists/liststart

For more information about this list (including removal) go to:
http://www.iea-software.com/support/maillists/liststart