|
Hilist
I would like to create a SELECT with diffrent criteria for fields in one
file.
I have a file with fields amount and quantity and additional fields
custnumb, ordernum, ordertype, orderdate etc.
The problem is that data for (sum of) amount and (sum of) quantity are
stored in diffrent rows. What is more complicated when row is "amount" in
field "quantity" value of weight is stored.
Next example
custnumb ordnumb ordtype orderdate amount quantity
1 1 A something 10
10
1 2 A something 20
20
1 1 B something 0
10
2 4 A something 10
15
2 4 B something 0
20
2 5 B something 0
20
And on report I would like to see (for same date range)
Custnumb amount quantity
1 30 10
2 10 40
Amount is sum of "amount" from rows A, quantity is sum of "quantity" from
rows B.
But how to write it? I created many joins but without success.
Have you any idea?
Regards
Tomasz Skorza
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.