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 ««12345»»»

Table Variable Expand / Collapse
Author
Message
Posted Monday, April 29, 2013 11:56 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, October 16, 2014 10:02 AM
Points: 1,372, Visits: 1,566
Danny Ocean (4/29/2013)
Lokesh Vij (4/29/2013)
[quote]Was keeping busy with my Master's exams. Finally they are over

So now its party time


Oh Yes..Sure!!
Have to submit dissertation/thesis by the end of December. Any research idea's please??


~ Lokesh Vij

Guidelines for quicker answers on T-SQL question
Guidelines for answers on Performance questions

Link to my Blog Post --> www.SQLPathy.com

Follow me @Twitter

Post #1447888
Posted Monday, April 29, 2013 11:57 PM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 12:02 AM
Points: 4,574, Visits: 8,363
Thanks everyone for positive feedback.

As you can guess the question came from practical experience when developers were puzzled with "odd" behaviour of SQL Server.
Had to build this sample script to make the matter clear.

Then it appeared to me other might benefit from it too.
Post #1447889
Posted Monday, April 29, 2013 11:59 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 2:47 AM
Points: 1,926, Visits: 2,352
Sergiy (4/29/2013)
Thanks everyone for positive feedback.

As you can guess the question came from practical experience when developers were puzzled with "odd" behaviour of SQL Server.
Had to build this sample script to make the matter clear.

Then it appeared to me other might benefit from it too.

+1



_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1447890
Posted Tuesday, April 30, 2013 12:01 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 10:52 PM
Points: 483, Visits: 244
Thanks for the tricky question on table variables. I enjoyed.
Post #1447891
Posted Tuesday, April 30, 2013 12:02 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, October 16, 2014 10:02 AM
Points: 1,372, Visits: 1,566
Sergiy (4/29/2013)

Then it appeared to me other might benefit from it too.


Much appreciated Sergiy. Keep it up!


~ Lokesh Vij

Guidelines for quicker answers on T-SQL question
Guidelines for answers on Performance questions

Link to my Blog Post --> www.SQLPathy.com

Follow me @Twitter

Post #1447894
Posted Tuesday, April 30, 2013 12:09 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 6:04 AM
Points: 1,127, Visits: 1,599
This was a very good one....learnt something new.

Vinu Vijayan

For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden
Post #1447898
Posted Tuesday, April 30, 2013 12:17 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, October 27, 2014 4:58 AM
Points: 1,360, Visits: 494
A nice one! I learnt something new, even if i wouldn't use this behaviour.
I'll still declare every variable as before. It's much easier to read and understand for me.
Post #1447901
Posted Tuesday, April 30, 2013 1:26 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Yesterday @ 8:24 AM
Points: 724, Visits: 697
Sergiy (4/29/2013)
Thanks everyone for positive feedback.

As you can guess the question came from practical experience when developers were puzzled with "odd" behaviour of SQL Server.
Had to build this sample script to make the matter clear.

Then it appeared to me other might benefit from it too.


Yep, nice one.


_______________________________________________
www.sql-kefalo.net (SQL Server saveti, ideje, fazoni i fore)
Post #1447912
Posted Tuesday, April 30, 2013 2:19 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:54 AM
Points: 7,814, Visits: 9,562
Nice fun question, clear explanation, back to basics of variable declarations.

Of course MS have got the documentation wrong yet again - this is another one of those. The the IF condition @ToCreate = 1 returns neither false nor true, so according to the introductory paragraph of the IF...ELSE BOL page neither the THEN nor the ELSE branch is executed and @Table should remain empty. Of course this doesn't happen, it's a bug in the documentation. I added some community content to the 2008 R2 page to point this out, but probably it won't get corrected.


Tom
Post #1447917
Posted Tuesday, April 30, 2013 4:11 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 9:19 AM
Points: 4,043, Visits: 5,358
Interesting question, thanks

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #1447938
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse