Find the missing data

  • In an order table there are Order filed in which we store the order number . Now here is my question how we know which order is missing if order is created sequentially . like (DOE8001,DOE8002 ....... AND DOW8001,DOW8002 ....... and so on. ) So please suggest me what can i do for know the missing orders .

  • Step 1... find the person that designed the ID column... take him/her to dinner... feed him/her 2 pound porkchops... at point blank range with a sling shot!

    Ok... having said that, I feel better.

    You need to give us a bit more information... is the format of the IDs consistently in the form of AAANNNN? Are they, in fact, unique?

    And, if you want a better answer quicker, please read and heed the advice given in the article at the following URL...

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply