Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Tom Thomson
»
Variant order 1
59 posts, Page 5 of 6
««
«
2
3
4
5
6
»»
Variant order 1
Rate Topic
Display Mode
Topic Options
Author
Message
KWymore
KWymore
Posted Wednesday, November 30, 2011 8:39 AM
SSCrazy
Group: General Forum Members
Last Login: 2 days ago @ 10:59 AM
Points: 2,579,
Visits: 1,537
Interesting question. My brain did the auto translation that v3=v2 was the same as v2=v3 so I didn't even notice that error until I hit the posts here!
I have not yet seen sql variants actually used in production but then again, we have very few 2008 instances up and running. I am curious how many out there are utilizing sql_variant and under which circumstances?
Post #1213994
Hugo Kornelis
Hugo Kornelis
Posted Wednesday, November 30, 2011 8:49 AM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 3:49 PM
Points: 5,244,
Visits: 7,063
KWymore (11/30/2011)
I have not yet seen sql variants actually used in production but then again, we have very few 2008 instances up and running.
There is no connection between sql_variant and SQL Server 2008. This data type has been around since at least SQL Server 2000. (I think even before that, but I could not find evidence of that, and I'm not sure if I can trust my memory anymore).
Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog:
http://sqlblog.com/blogs/hugo_kornelis
Post #1214007
SQLRNNR
SQLRNNR
Posted Wednesday, November 30, 2011 8:53 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 10:25 AM
Points: 18,754,
Visits: 12,337
Thanks for the question.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1214012
Toreador
Toreador
Posted Wednesday, November 30, 2011 8:54 AM
Ten Centuries
Group: General Forum Members
Last Login: Friday, May 17, 2013 9:52 AM
Points: 1,356,
Visits: 4,761
KWymore (11/30/2011)
I am curious how many out there are utilizing sql_variant and under which circumstances?
I've used it for generic audit tables, where we store something like table name, column name, old value, new value - the old/new values are sql_variant as they could be any data type.
Of course you'd never do any comparisons between different data types in these circumstances.
Post #1214013
OzYbOi d(-_-)b
OzYbOi d(-_-)b
Posted Wednesday, November 30, 2011 8:54 AM
Ten Centuries
Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:53 AM
Points: 1,176,
Visits: 778
Tks Tom for the question
Post #1214014
SQLRNNR
SQLRNNR
Posted Wednesday, November 30, 2011 8:59 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 10:25 AM
Points: 18,754,
Visits: 12,337
Hugo Kornelis (11/30/2011)
Gerardo Galvan Castro (11/30/2011)
In the e-mail newsletter the QotD did not state it was for SQL Server 2008 and later, so I tested under SQL Server 2005 (the only version I have available to use), which would not allow me to run it because "you cannot assign a default value to a local variable", so i chose "None of the above" just to find out it was meant to be run under SQLS 2K8.
I'd say, with both SQL Server 2008 and SQL Server 2008R2 released and SQL Server 2012 around the corner, it is safe to assume that
question are about SQL Server 2008/2008R2 unless specified otherwise
.
Agreed.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1214023
SQLRNNR
SQLRNNR
Posted Wednesday, November 30, 2011 9:00 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 10:25 AM
Points: 18,754,
Visits: 12,337
Toreador (11/30/2011)
KWymore (11/30/2011)
I am curious how many out there are utilizing sql_variant and under which circumstances?
I've used it for generic audit tables, where we store something like table name, column name, old value, new value - the old/new values are sql_variant as they could be any data type.
Of course you'd never do any comparisons between different data types in these circumstances.
That is a good use - thanks for posting that. I will have to explore that use.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1214024
Stuart Davies
Stuart Davies
Posted Wednesday, November 30, 2011 9:22 AM
SSCrazy
Group: General Forum Members
Last Login: 2 days ago @ 1:41 AM
Points: 2,477,
Visits: 2,140
KWymore (11/30/2011)
Interesting question. My brain did the auto translation that v3=v2 was the same as v2=v3 so I didn't even notice that error until I hit the posts here!
+1
-------------------------------
Posting Data Etiquette - Jeff Moden
Smart way to ask a question
There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
Post #1214047
SQLRNNR
SQLRNNR
Posted Wednesday, November 30, 2011 9:28 AM
SSCoach
Group: General Forum Members
Last Login: 2 days ago @ 10:25 AM
Points: 18,754,
Visits: 12,337
Stuart Davies (11/30/2011)
KWymore (11/30/2011)
Interesting question. My brain did the auto translation that v3=v2 was the same as v2=v3 so I didn't even notice that error until I hit the posts here!
+1
+1
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1214055
Revenant
Revenant
Posted Wednesday, November 30, 2011 9:53 AM
Hall of Fame
Group: General Forum Members
Last Login: 2 days ago @ 2:20 PM
Points: 3,462,
Visits: 2,539
SQLRNNR (11/30/2011)
Stuart Davies (11/30/2011)
KWymore (11/30/2011)
Interesting question. My brain did the auto translation that v3=v2 was the same as v2=v3 so I didn't even notice that error until I hit the posts here!
+1
+1
+1
Post #1214077
« Prev Topic
|
Next Topic »
59 posts, Page 5 of 6
««
«
2
3
4
5
6
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.