1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
select myTable locate for date=ldDate and loc=lnLoc if !found() insert into myTable (date,loc,total,avg) values(ldDate,lnLoc,lnTotal,lnAvg) else replace date with ldDate replace loc with lnLoc replace total with lnTotal replace avg with lnAvg endif
1: 2: 3: 4: 5: 6: 7: 8: 9:
select myTable locate for date=ldDate and loc=lnLoc if !found() insert into myTable (date,loc,total,avg) values(ldDate,lnLoc,lnTotal,lnAvg) else replace total with lnTotal, ; avg with lnAvg endif