>Is there a possible way to get away from SQL Statements?
Sure, but I don't know why you'd want to do that. You can do the whole thing with 1 line of code vs doing a bunch of scan/seeks.
Oh well... Actually you can do it without a bunch of scan/seeks, if all you want to do is count.
Assuming that table2 is already indexed on inv_no:
select table1
set relation to inv_no into table2
count for not found("table2") to lnTotal
set relation to
How's that?
--Brad