June 25, 2008 at 2:48 am
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
June 25, 2008 at 5:27 am
See usage of SET ANSI_NULLS ON|OFF
June 25, 2008 at 6:45 am
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
Change is inevitable... Change for the better is not.
June 25, 2008 at 6:47 am
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
Change is inevitable... Change for the better is not.
June 26, 2008 at 3:00 am
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
June 26, 2008 at 5:15 am
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
Change is inevitable... Change for the better is not.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply