Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    15

    Unanswered: Identifying disparity in record counts

    Hello,

    What is the best way to identify disparity in stored procedures. We do a lot of inserts and updates in various tables through several stored procedures, but with all this going on, we either end up with more records or less records than what we started with.

    Part of the problem is when there are duplicates in some of these tables (should not be there), or problems with Nulls that causes our counts to mismatch.

    Does anyone have suggestions/solutions how to keep track of record counts for each update/insert process and roll back to the parent stored procedure and retun the results back to the user?

    Thank You, your suggestion is much appreciated it!!

  2. #2
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    Quote Originally Posted by Malachi4
    Hello,

    What is the best way to identify disparity in stored procedures. We do a lot of inserts and updates in various tables through several stored procedures, but with all this going on, we either end up with more records or less records than what we started with.

    Part of the problem is when there are duplicates in some of these tables (should not be there), or problems with Nulls that causes our counts to mismatch.

    Does anyone have suggestions/solutions how to keep track of record counts for each update/insert process and roll back to the parent stored procedure and retun the results back to the user?

    Thank You, your suggestion is much appreciated it!!
    Not exactly sure what you are trying to get at.

    But if you want to omit duplicates easily, you can have a unique index on the table which will reject all duplicates. Then you will find the offending stored proc and the raw data its inputting and maybe you can take it from there.

    If you dont want null values in columns then make it not null.

    If you have other customised checks which you want to do, create triggers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •