The code below gives me an error message for the second SQL statement that says 'mernumber' does not exist. When I browse the table from the first statement, it's right there. What am I missing here?
FWIW: I've recently installed SP4 for VFP. Has anyone found problems with it that I may not be aware of?
Thanks! -- Gerry
** Main query -- gets records for applicable month from RETURNS table **
SELECT mernumber, eftdate ;
FROM &gcDrvDataH.\collect\returns ;
WHERE ReasonCode = "01" ;
AND EFTDate BETWEEN gdBeginDate AND gdEndDate ;
ORDER BY mernumber, EFTDATE ;
INTO TABLE &gcDirTemp.Returns_NSF
** now count how many NSF transactions have occurred per merchant **
SELECT mernumber, eftdate, COUNT(*) AS TotPerMerPerMon ;
FROM &gcDirTemp.Returns_NSF ;
GROUP BY Returns_NSF.mernumber, MONTH(Returns_NSF.EFTDate) ;
INTO TABLE &gcDirTemp.NSF_Count
** Gerry White / Hagerstown, MD, USA --
** Developing since 1986 in Foxpro, VFP, Oracle, and Java.
**
http://GerrysPlace.com