What happens if updating cursor did not fetch any records


26-Aug-2017 08:35

Will changing the code to use a select-into instead of declaring and opening a cursor make the program more efficient? I probably could use some grouping and/or max function to get down to one record.

I probably could use some grouping and/or max function to get down to one record.

Or should I create the index and hope the SQE is smart enough to identify and use the index (this may be happening already).

Otherwise, I am afraid an index is being built for every declare/open/fetch/close processed in the loop. Each record holds costing information from inventory.

what happens if updating cursor did not fetch any records-11

dating a christian boy

The warehouse transactions are limited to purchase order receipts for a particular product in date descending order.

I'm not sure that will do much for you efficiency-wise.