sql_language thread: use a cursor... or leave the looping to the application?
I am creating a payroll system, and need to do all kinds of calculations for
each employee (withholding, health benefit deductions, etc) and wanted to
ask the SQL gurus their opinions...
Should I execute only one process using a cursor to select all the employees
and perform the calculations, or should I leave the looping up to my
application? It sounds like I should just make use of the database cursor
and make only one call to the database, instead of one call for each
employee (there isn't very many, only ~60). Would a cursor be that big a
memory hog that I should avoid it at all costs?
Is this correct? Thank you O Gurus.
Arbon Reimer
Golden, Colorado