I am working with a table that may have duplicate CONSTITID numbers in it. For the field 'CONSTITID' I need to start by counting how many times the ID occurs and write the count to a table. Right now I am ending up with a count of one everytime, even though I can see duplicate numbers because the table is sorted by that field and not keyed.
Thanks in advance.
-Steve
Code:
rempsTC.open(":WORK:REMPSSA_WMS_BC.DB")
while not rempsTC.eot()
cid1 = rempsTC.CONSTITID
numFound = 0
scan rempsTC:
if rempsTC.CONSTITID = cid1 then
numFound = numFound + 1
else
endIf
endScan
numTC.open(":WORK:NumFound.db")
numTC.edit()
numTC.insertAfterRecord()
numTC."ConstitID" = cid1
numTC."NumberFound" = NumFound
rempsTC.nextrecord()
endWhile
msgInfo("Done","Done!")
Thanks in advance.
-Steve