Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

vtable Expand / Collapse
Author
Message
Posted Wednesday, June 25, 2008 2:48 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 8:23 AM
Points: 2,025, Visits: 2,521
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 = Null and @ACls = Null and @SId = Null and @SDetId = Null)

which I changed to this

If ( @MID is Null and @sP 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
Post #523097
Posted Wednesday, June 25, 2008 5:27 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, April 29, 2013 6:28 AM
Points: 1,252, Visits: 63
See usage of SET ANSI_NULLS ON|OFF
Post #523172
Posted Wednesday, June 25, 2008 6:45 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 1:53 PM
Points: 35,366, Visits: 31,905
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #523235
Posted Wednesday, June 25, 2008 6:47 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 1:53 PM
Points: 35,366, Visits: 31,905
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #523237
Posted Thursday, June 26, 2008 3:00 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 8:23 AM
Points: 2,025, Visits: 2,521
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
Post #523954
Posted Thursday, June 26, 2008 5:15 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 1:53 PM
Points: 35,366, Visits: 31,905
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #524015
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse