The code below works but I would like to speed it up. Any ideas? Table1 has 1.1 million records. Table2 was created using: SELECT COUNT(*), * FROM table1...GROUP BY address, zip and has 53k records.
Code:
findaddr = ""
findzip = ""
lowest = 0
use table1 in 0
use table2 in 0
select table2
go top
do while not eof()
* save the values in table 2
findaddr = address
findzip = zip
* get the min value in table1.oldseq
select table1
calculate min(val(oldseq)) for (address == findaddr and zip == findzip) to lowest
* save that value (as char) in table2.lowseq
select distaddr
replace lowseq with alltrim(str(lowest))
skip 1
enddo