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
»
SQLServerCentral.com
»
SQLServerCentral.com Announcements
»
Implicit Conversions
26 posts, Page 1 of 3
1
2
3
»
»»
Implicit Conversions
Rate Topic
Display Mode
Topic Options
Author
Message
Site Owners
Site Owners
Posted Saturday, May 03, 2008 12:01 PM
SSChampion
Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,040,
Visits: 1
Comments posted to this topic are about the item
Implicit Conversions
Post #494662
gbpthomas
gbpthomas
Posted Sunday, May 04, 2008 1:20 AM
SSC Eights!
Group: General Forum Members
Last Login: Monday, August 25, 2008 9:56 PM
Points: 843,
Visits: 38
Why 3 marks for this question??
Post #494683
Jeff Moden
Jeff Moden
Posted Sunday, May 04, 2008 9:30 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 5:33 PM
Points: 32,902,
Visits: 26,783
3 Marks isn't bad or good... it means "average" and it is an "Average" question. :P
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
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."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #494699
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Sunday, May 04, 2008 9:50 AM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 2:54 PM
Points: 31,410,
Visits: 13,726
I put it as 3 because I think implicit conversions cause a lot of issues, waste time, and I see a lot of questions on these. So it's important.
I may go back and "re-rate" some questions, moving some 1s to 2s and 2s to 3s or 4s, trying to weight them a little more when you have to think. I'll adjust points for correct answers as well if I do.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #494701
Jeff Moden
Jeff Moden
Posted Sunday, May 04, 2008 10:07 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 5:33 PM
Points: 32,902,
Visits: 26,783
I agree... judging from some of the "Why am I getting this error" questions on the forum, implicit conversions to "bite" people a lot. This "simple" question is a very good example of a lot of problems folks have with UNIONs and other places where columnar data is mixed to form a single column.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
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."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #494702
Anipaul
Anipaul
Posted Monday, May 05, 2008 2:04 AM
SSCarpal Tunnel
Group: General Forum Members
Last Login: Yesterday @ 6:03 AM
Points: 4,787,
Visits: 1,335
Simple but strong question. We require more this type of questions where you have to 'think' before answering.
Before seeing Jeff's comment 'Average Question' :P, I thought it was 'good' question as the marks is '3' not the normal '1'. So I thought more than require.
Post #494814
Jason Miller-476791
Jason Miller-476791
Posted Monday, May 05, 2008 6:24 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, November 18, 2010 5:25 AM
Points: 162,
Visits: 694
Perhaps I missed something...
But I believe this works on SQL2000, but 2005.
There was a change to the behavior of unions....
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/47edefbd-a09b-4087-937a-453cd5c6e061.htm
Honor Super Omnia-
Jason Miller
Post #494903
srienstr
srienstr
Posted Monday, May 05, 2008 6:56 AM
SSC Veteran
Group: General Forum Members
Last Login: Yesterday @ 6:58 AM
Points: 210,
Visits: 372
I have 2000, and it gave the "correct" result for me.
Puto me cogitare, ergo puto me esse.
I think that I think, therefore I think that I am.
Post #494918
William Vach
William Vach
Posted Monday, May 05, 2008 7:21 AM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 12:45 PM
Points: 2,110,
Visits: 1,069
This does not work on SQL Server 2005. You get the following error message:
"Msg 245, Level 16, State 1, Line 1
Conversion failed when converting the varchar value 'B' to data type int."
Post #494933
dunnjoe
dunnjoe
Posted Monday, May 05, 2008 8:03 AM
SSCommitted
Group: General Forum Members
Last Login: Thursday, March 31, 2011 1:40 AM
Points: 1,938,
Visits: 208
That's why I feel answer b is not correct. Answer b says the value is converted to an int. The error message says the conversion failed. So, it appears to be a compilation error.
Post #494985
« Prev Topic
|
Next Topic »
26 posts, Page 1 of 3
1
2
3
»
»»
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.