USE HOME(2) + "data\customer" SELECT cust_id, sum(maxordamt) FROM customerWhat cust_id are you going to get here? It will be essentially random, having nothing to do with the final sum.
SELECT ; (aTmpData.nRein0 + ; aTmpData.nRein30 + ; aTmpData.nrein90 + ; aTmpData.nrein91 + ; aTmpData.nrein181), ; SUM(aTmpData.nRein0), ; SUM(aTmpData.nRein30), ; SUM(aTmpData.nrein90), ; SUM(aTmpData.nrein91), ; SUM(aTmpData.nrein181)So, what value for
nRein0 + nRein30 + nRein90 + nRein91 + nRein181
should it pick here to go with the SUMmed fields?