You can modify the query to include the SQL where clause, for example
Select whatever fields From whatevertable where branchnumber in ( select branchnumber from whatevertable where branchid=xxz )
I would also really like to look at read-only cursors, read-only cursors, to give the greatest speed increase.
Darian miller
source share