February 8, 2016 at 10:04 pm
Comments posted to this topic are about the item Converting hex values
February 8, 2016 at 11:45 pm
This was removed by the editor as SPAM
February 9, 2016 at 3:21 am
Yet another question where "None of the above" is the correct answer.
February 9, 2016 at 4:59 am
I like the ones where you have to try and figure out what's wrong with the question, then go for the option you think the questioner intended - thanks Steve! 😀
February 9, 2016 at 5:31 am
sipas (2/9/2016)
I like the ones where you have to try and figure out what's wrong with the question, then go for the option you think the questioner intended - thanks Steve! 😀
I do that with my code - litter it with unchecked errors. Much more fun than doing it right, I find.
February 9, 2016 at 5:36 am
That was a good one - it had me wondering what I did wrong for a little while.
February 9, 2016 at 7:11 am
FWIW:
DECLARE @i VARBINARY = 0x0005432345544
select LEFT(@i, 3), LEFT(CONVERT(VARCHAR(64),@i),3), LEFT(CONVERT(VARCHAR(64),@i,1),3), LEFT(CONVERT(VARCHAR(64),@i,2),3)
produced:
(No column name) (No column name) (No column name) (No column name)
0x0 00
on my box. So none of the answers are correct
February 9, 2016 at 8:06 am
Yeah, the VARBINARY with default length of 1 threw me off for a moment, since I expected some tricky "None of the above" answer. After seeing the answers, though, it was pretty clear what was intended.
At any rate, the question prompted my getting reacquainted with all the caveats about converting to and from the binary types, so a nice start to the day!
February 9, 2016 at 8:13 am
gbritton1 (2/9/2016)
FWIW:
DECLARE @i VARBINARY = 0x0005432345544
select LEFT(@i, 3), LEFT(CONVERT(VARCHAR(64),@i),3), LEFT(CONVERT(VARCHAR(64),@i,1),3), LEFT(CONVERT(VARCHAR(64),@i,2),3)
produced:
(No column name) (No column name) (No column name) (No column name)
0x0 00
on my box. So none of the answers are correct
The same on my pc. However, interesting question.
Igor Micev,My blog: www.igormicev.com
February 9, 2016 at 9:23 am
Ed Wagner (2/9/2016)
That was a good one - it had me wondering what I did wrong for a little while.
Me too, which is why I wrote the question
February 9, 2016 at 9:33 am
Steve Jones - SSC Editor (2/9/2016)
Ed Wagner (2/9/2016)
That was a good one - it had me wondering what I did wrong for a little while.Me too, which is why I wrote the question
It looks like we weren't the only ones scratching our heads. I thought it was a good question, one of those that make you see what else is going on and check your assumptions.
February 9, 2016 at 11:36 am
I got to waste 15-20 minutes wondering why I wasn't getting the right results and experimenting before I realized there was a default.
February 9, 2016 at 5:10 pm
None of the formula options produced the expected result. The correct answer to this QOD is None of the answers is correct.
February 10, 2016 at 5:00 am
julienchappel 38298 (2/9/2016)
None of the formula options produced the expected result. The correct answer to this QOD is None of the answers is correct.
That was part of the question. "None of the Above" wasn't an option. The real point of the question, beyond looking at the value, was the very common mistake present in the question.
February 10, 2016 at 12:54 pm
Apologies, the hex value wasn't well formed.
I've changed this to return 000 now
Viewing 15 posts - 1 through 15 (of 16 total)
You must be logged in to reply to this topic. Login to reply