Hi All,
I have this query:
<cfquery name="q1" datasource="DSN" dbtype="ODBC">
SELECT CPCSTP, YHSPRT, IDESC, YHSSQT01, YHSMM, YHSYY, CNME, CCUST
FROM SALSUM
WHERE CCUST IN (4850,2985,2829,2568,2468,2187,2175,1865,1861,1857,1852,1851,1850,1717,1695,1599)
AND YHSYY=#thisyear#
OR YHSYY=#lastyear#
ORDER BY YHSPRT, YHSYY DESC, YHSMM
</cfquery>
There are 156721 records. I'm trying to generate a sales history and have look like this:
Customer Name: REPUBLIC WINDOW & DOOR
Customer Number: 2109
Description Truth part # Customer
part # Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Total
SASH LOCK ASSY,RH A09200407.48 2909201WG T/Y 0
L/Y 2000 3000 5000
SASH LOCK ASSY,RH A09200407CT 2909201BG T/Y 0
L/Y 4000 4000 3000 11000
Description = IDESC
Truth Part # = YHSPRT
Customer part # = CPCSTP
Is there a fast way of accomplishing this? If you need more detail I will provide it upon request. Not a big deal if nobody responds.
Ron
