vtable

  • All,

    I have faced a different problem recently.

    When i executed a procedure from back end, it works fine.

    But when i executed the same procedure from UI, it is not giving the proper result.

    I also identified the problem.

    The problem is

    i have one condition in my procedure. The procedure will get value from the front end.

    If ( @MID = Null and @sp-2 = Null and @ACls = Null and @sid = Null and @SDetId = Null)

    which I changed to this

    If ( @MID is Null and @sp-2 is Null and @ACls is Null and @sid is Null and @SDetId is Null)

    then it works fine from UI.

    I remember one rule about NULL. Two nulls are not equal.

    I also have studied an article here about Difference between =NULL and IS NULL. In that article he mentioed about vtable ( to store table variables). As i want to know more about it,I have searched on websites, but i can't get any clear information.

    It would be appreciated if anyone give more information on that.

    karthik

  • See usage of SET ANSI_NULLS ON|OFF

  • Change the default setting will likely open a huge can of worms for you... lot's of other folks code depends on NULLs not being equal to anything and changing that setting will break ALL of that code.

    So far as "vtables" go, are you talking about "Table Variables"?

    --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)

  • Sorry... you are talking about "Table Variables"... best to look up about those in Books Online and take a look at the following article...

    http://support.microsoft.com/default.aspx?scid=kb;en-us;305977&Product=sql2k

    --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)

  • Thanks Jeff and prabodh.

    So far as "vtables" go, are you talking about "Table Variables"?

    No.

    I understood the difference between =NULL,ISNULL and SET ANSIL NULL ON/OFF after reading the below article.

    http://www.sqlservercentral.com/articles/Basic+Querying/understandingthedifferencebetweenisnull/871/

    In this article, he has used vtable, just i wanted to know more about that.

    karthik

  • Ah... got ya...

    Nope... I don't know, at the machine language level, what the memory address of vtable in SQL Server is.

    --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 6 posts - 1 through 5 (of 5 total)

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