|
Change your "group by" clause to "group by a.emply,year,month" and you should see the output you expect. Hope that helps. Donald R. Fisher, III Project Manager The Roomstore Furniture Company (804) 784-7600 extension 2124 DFisher@roomstoreeast.com <clip> select a.emply, year(date(substr(digits(a.dtechk),1,4)||'-'|| substr(digits(a.dtechk),5,2)||'-'|| substr(digits(a.dtechk),7,2))), month(date(substr(digits(a.dtechk),1,4)||'-'|| substr(digits(a.dtechk),5,2)||'-'|| substr(digits(a.dtechk),7,2))), sum( b.amtdol ) from pylookup/prtranh a join pylookup/prtrand b on (a.refer=b.refer) where a.emply='9360' and a.dtechk between 20000101 and 20011231 and payid <= 3000 group by a.emply, a.dtechk order by 1 <clip>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.