SQL Server Performance

Cursor skipping rows fetch

Discussion in 'SQL Server 2008 General DBA Questions' started by mailvinaym, Aug 5, 2009.

  1. mailvinaym New Member

    I have problem which is observed for as much as three times.
    1) Our process has a cursor where it fetches all the records from staging
    2) then we have a conditional statement where it checks for a particular variable equal to 0 or not
    3) then the process inserts into master table from staging and skips insert when the variable value is <> 0
    4) the issue is the process skips fetch operation and end up in only inserting or updating few records
    the mystery is the process never fails. Please let me know the reason for this issue.
  2. MohammedU New Member

    Welcome to the forum...
    Please post your code to take a look, if possible with ddl and sample data...

Share This Page