June 29, 2015 at 9:31 pm
Comments posted to this topic are about the item Integer lengths (I)
Tom
June 30, 2015 at 1:43 am
Surely this question is less about integer lengths and more about string conversions?
What it's really drawing attention to is that str(), which produces a fixed length string, left pads on conversion, while cast/convert right pad a fixed length string. This happens regardless of whether the input is an integer.
Good question though - certainly highlighted something I was unaware of - glad I always opt for explicit type conversions 🙂
June 30, 2015 at 3:04 am
Great question, thanks!
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
June 30, 2015 at 3:35 am
Nice,failed due to the right justified result of STR.
June 30, 2015 at 4:33 am
This was removed by the editor as SPAM
June 30, 2015 at 4:44 am
Well done, Tom. Not only way it clear, concise and correct, it made me think it through, which is always good. Thanks.
June 30, 2015 at 4:53 am
Nice question, thanks Tom.
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
June 30, 2015 at 6:47 am
Nice question Tom. I haven't used the STR() function before.
June 30, 2015 at 7:02 am
Good one. Learned something by getting it wrong. 🙂
June 30, 2015 at 7:16 am
Stewart "Arturius" Campbell (6/30/2015)
Nice question, thanks TomNever been fond of the STR() function myself, as i prefer explicit cast/convert
+1. My thoughts exactly.
June 30, 2015 at 10:09 am
Cool question, thanks.
- webrunner
-------------------
A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
June 30, 2015 at 11:56 am
Very neat. Thanks you, Tom!
June 30, 2015 at 11:37 pm
great question. thanks for sharing
July 1, 2015 at 12:11 am
Is NULL=NULL true ?
That's the question.
Most things in life can be reduced to one single question.
July 1, 2015 at 2:47 am
This was removed by the editor as SPAM
Viewing 15 posts - 1 through 15 (of 20 total)
You must be logged in to reply to this topic. Login to reply