_srchTerritoryId: #listlen(_srchTerritoryId)# #_srchTerritoryId# _territoryList: #listlen(_territoryList)# #_territoryList#
select 0 as rowNumber, *
from qrySalesCalls
select *
from qrySalesCalls
where rownumber >= #_startRow#
and rownumber <= #_endRow#