February 28, 2018 at 8:08 pm
Comments posted to this topic are about the item FORMAT that string
February 28, 2018 at 8:54 pm
Hmmm, can you double check that answer Steve? Nice presentation on SQL In the City by the way. Hope your cough went away!
February 28, 2018 at 10:33 pm
Similarly confused!?
...
March 1, 2018 at 12:52 am
SELECT FORMAT(COUNT(*),'#')
FROM HolydaysToDo
WHERE HolydaysToDo.Name = 'Steve Jones'
The result:
Arithmetic overflow error converting expression to data type bigint
A lot of days
ππ
March 1, 2018 at 1:00 am
Although I never use the format function because of it's horrific performance, I am pretty certain that the alleged answer is not the correct one.
π
March 1, 2018 at 1:29 am
Joining the throng of questions on the answer here!!! I'm pretty sure it is currently wrong!
March 1, 2018 at 2:13 am
Yet another wrong QoTD.
March 1, 2018 at 2:28 am
Gah, not sure what I was thinking. Must have gotten distracted as I was moving the code over. Corrected. The answer and explanation should be 0####
March 1, 2018 at 4:27 am
Glad i answered after the correction was applied.
Nice question, thanks Steve
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
βlibera tute vulgaris exβ
March 1, 2018 at 4:59 am
I too answered after it was corrected and got it right.
But ... storing zip codes in a numeric field? Bah. Just because something is made up of numerals (like a zip code, phone number, ssn) doesn't mean it's numeric. Store the data correctly and you won't need to format it.
March 1, 2018 at 7:53 am
The correct answer should be E. None of the above. Store postal codes as string values.
March 1, 2018 at 9:06 am
Jedak - Thursday, March 1, 2018 7:52 AMThe correct answer should be E. None of the above. Store postal codes as string values.
And don't use FORMAT
March 1, 2018 at 9:06 am
Jedak - Thursday, March 1, 2018 7:52 AMThe correct answer should be E. None of the above. Store postal codes as string values.
Amen to that. They often contain a four digit group separated by a dash.
March 1, 2018 at 9:53 am
Should != reality. Unfortunately.
March 1, 2018 at 10:13 am
Revenant - Thursday, March 1, 2018 9:06 AMJedak - Thursday, March 1, 2018 7:52 AMThe correct answer should be E. None of the above. Store postal codes as string values.Amen to that. They often contain a four digit group separated by a dash.
and outside the USA they could contain anything...
Viewing 15 posts - 1 through 15 (of 17 total)
You must be logged in to reply to this topic. Login to reply