[Emerald] sql help calculating invoices

Bernard Andrys ( (no email) )
Thu, 10 Aug 2000 16:14:28 -0400

I'm trying to create a query for accounting that lists the invoices billed
by account type for a particular month.

Here is the query I came up with:

SELECT Sum(Invoices.Amount) AS SumOfAmount, SubAccounts.AccountType
FROM Invoices, SubAccounts
WHERE (((Invoices.Date)>'6/30/00' And (Invoices.Date)<'8/1/00'))
GROUP BY SubAccounts.AccountType;

However, it doesn't work at all. It seems to be ignoring the "WHERE" clause
and adding together every invoice ever produced. Any suggestions would be
appreciated.

SumOfAmount AccountType
--------------------- ---------------
2040102.6800 Bell Atl Charge
1298247.1600 Co-Hosted Serve
175263366.6000 EMAIL
370927.7600 Frame Relay 128
185463.8800 Frame Relay 256
16320821.4400 ISDN
3338349.8400 ISDN-Dedicated
1298247.1600 ISDN-Semi Dedic
741855.5200 Metered Ethernt
3122469883.6800 PPP
6120308.0400 Shell
3894741.4800 Static IP
370927.7600 T1
53228133.5600 Web-Basic
2225566.5600 Web-Complete
42285764.6400 Web-Personal

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