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 Yousaf Khan
»
concatenation
36 posts, Page 1 of 4
1
2
3
4
»
»»
concatenation
Rate Topic
Display Mode
Topic Options
Author
Message
Yousaf Khan
Yousaf Khan
Posted Monday, August 20, 2012 8:15 PM
SSC-Addicted
Group: General Forum Members
Last Login: Wednesday, September 26, 2012 10:43 PM
Points: 407,
Visits: 73
Comments posted to this topic are about the item
concatenation
Post #1347534
bitbucket-25253
bitbucket-25253
Posted Monday, August 20, 2012 8:16 PM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 7:13 PM
Points: 5,103,
Visits: 20,214
Nice question .. good to be reminded of the fundamentals / basic stuff ..
Thanks
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please
read
Before posting a performance problem please
read
Post #1347535
Lokesh Vij
Lokesh Vij
Posted Monday, August 20, 2012 9:52 PM
Ten Centuries
Group: General Forum Members
Last Login: 2 days ago @ 8:24 AM
Points: 1,176,
Visits: 1,253
Good question
Its always wonderfu to brush up our fundamentals
~ 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 #1347550
Prassad Dabbada V R
Prassad Dabbada V R
Posted Tuesday, August 21, 2012 1:10 AM
SSC Veteran
Group: General Forum Members
Last Login: Friday, April 05, 2013 2:36 AM
Points: 222,
Visits: 101
I thought it will conevert everything to int. As the expression eveluates from right to left so from the right first plus will return 121 (120 will be converted to int) and so on and so forth.
but unfortunately my guess is wrong.
Post #1347598
Michael Lysons
Michael Lysons
Posted Tuesday, August 21, 2012 1:33 AM
Ten Centuries
Group: General Forum Members
Last Login: Friday, May 17, 2013 1:59 AM
Points: 1,126,
Visits: 924
Good question. More learning for me.
Post #1347604
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
Posted Tuesday, August 21, 2012 2:40 AM
Hall of Fame
Group: General Forum Members
Last Login: 2 days ago @ 8:31 AM
Points: 3,129,
Visits: 4,312
good back-to-fundamentals question
Thanks, Yousaf
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #1347636
Andrew Watson-478275
Andrew Watson-478275
Posted Tuesday, August 21, 2012 2:55 AM
SSC Eights!
Group: General Forum Members
Last Login: Saturday, May 18, 2013 1:44 AM
Points: 953,
Visits: 1,875
A good question (which I got wrong
), but I think that these references better explain what's happening:
http://msdn.microsoft.com/en-us/library/ms190276
(operator precedence)
http://msdn.microsoft.com/en-us/library/ms190309
(data type precedence)
When two operators have the same precedence (as concatenate and add do), then they are evaluated from left to right, so the first plus (concatenate) is done first. When the second plus is evaluated, data type precedence is considered and Int trumps String.
Post #1347640
DugyC
DugyC
Posted Tuesday, August 21, 2012 2:59 AM
Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 3:25 AM
Points: 1,165,
Visits: 731
Yay! I like these questions I can answer in the blink of an eye... now, back to work.
Thanks for today's question
_____________________________________________________________________
"The difficult tasks we do immediately, the impossible takes a little longer"
Post #1347641
(Bob Brown)
(Bob Brown)
Posted Tuesday, August 21, 2012 4:05 AM
Say Hey Kid
Group: General Forum Members
Last Login: Friday, April 19, 2013 10:27 AM
Points: 690,
Visits: 1,100
Good question. Need to remember the basics.
Post #1347668
Hugo Kornelis
Hugo Kornelis
Posted Tuesday, August 21, 2012 4:06 AM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 3:03 PM
Points: 5,244,
Visits: 7,061
A good question. I'll admit that I am surprised at the high number of incorrect answers; I would have expected 70 to 80 percent to get this right.
I'm not surprised that the wrong answers are fairly evenly divided over the wrond answers; they are all very good distractors. Well done!
And Andrew, thank you for providing the links and explanation that really explain the results; they are a good addition to the explanation and references given bij Yousaf.
Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog:
http://sqlblog.com/blogs/hugo_kornelis
Post #1347669
« Prev Topic
|
Next Topic »
36 posts, Page 1 of 4
1
2
3
4
»
»»
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.