At first glance, this method looks like that it will return the number of rows selected on a table. But that is not the case. If we run the following lines, the result will be always -1 select custTable where custTable.custGroup=='10'; print custTable.rowCount(); The issue is that this method is to be used only with set based operations on the database. So, if you are using insert_recordset, update_recordset or delete_from, the rowCount() method will return the number of rows created, updated or deleted. Here is a sample job that shows this in action. static void rowCountJob(Args _args) { CustTable custTable; MyTable myTable; ; ttsbegin; insert_recordset myTable(AccountNum, PartyId, CustGroup, Currency) select AccountNum, PartyId, CustGroup, Currency from custTable where custTable.CustGroup== '10'; // Prints 13 as 13 records with custGroup == 10 were inserted from CustTable print myTable.Row...