July 7, 2018 at 11:21 am
Comments posted to this topic are about the item STRING_SPLIT()
July 7, 2018 at 6:28 pm
Steve Jones - SSC Editor - Saturday, July 7, 2018 11:21 AMComments posted to this topic are about the item STRING_SPLIT()
I don't know what went wrong. I clicked on the correct answer and it said I was wrong and it cited one of the other answers in the explanation.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 8, 2018 at 12:45 am
The alleged "correct" answer is wrong.
😎
What version of SQL Server did you test this on Steve? Looks to me that there must be an implicit type conversion on the delimiter parameter.
July 8, 2018 at 7:27 am
Eirikur Eiriksson - Sunday, July 8, 2018 12:45 AMThe alleged "correct" answer is wrong.
😎What version of SQL Server did you test this on Steve? Looks to me that there must be an implicit type conversion on the delimiter parameter.
Lordy... I have to answer these things when I'm sufficiently caffeinated. I didn't read what the post thought was the correct answer, which is patently incorrect thanks to the space in the delimiter and, yes, I did click the correct answer... not what the post thinks the correct answer is.
I don't care about the points (never did) but, as Eirikur states, the alleged correct answer isn't correct and needs to be repaired.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 8, 2018 at 7:49 am
Jeff Moden - Sunday, July 8, 2018 7:27 AMEirikur Eiriksson - Sunday, July 8, 2018 12:45 AMThe alleged "correct" answer is wrong.
😎What version of SQL Server did you test this on Steve? Looks to me that there must be an implicit type conversion on the delimiter parameter.
Lordy... I have to answer these things when I'm sufficiently caffeinated. I didn't read what the post thought was the correct answer, which is patently incorrect thanks to the space in the delimiter and, yes, I did click the correct answer... not what the post thinks the correct answer is.
I don't care about the points (never did) but, as Eirikur states, the alleged correct answer isn't correct and needs to be repaired.
I use this to get properly caffeinated before responding to anything in the morning
😎
Takes about 3-4 single espressos in about half an hour but then nothing can put one to sleep for the next 18-20 hours 😀
Just as Jeff said, this is not about any points, it's all about retaining the good quality of advice provided by the SSC community and this website.
July 8, 2018 at 2:53 pm
The second parameter is not acceptable - https://docs.microsoft.com/en-us/sql/t-sql/functions/string-split-transact-sql?view=sql-server-2017
July 8, 2018 at 11:25 pm
and here i thought - am i losing my marbles?
the space after the coma in the delimiter will surely cause an error...
glad i'm not the only one who thinks the "correct" answer is actually incorrect...
July 9, 2018 at 12:15 am
Didn't have any coffee yet, but selected the right (wrong) answer..
July 9, 2018 at 1:14 am
DECLARE @cars VARCHAR(200) = 'Porsche, Ferrari, Bentley, Jaguar,Range Rover'
SELECT *
FROM STRING_SPLIT(@cars, ', ')
please, remove last blank from separator
July 9, 2018 at 4:03 am
Right answer is an error. Problem is the space after the comma in the function. I want my point back! 🙂
July 9, 2018 at 6:12 am
Yep - at least everyone else saw the same thing I saw. Incorrect answer marked as correct.
July 9, 2018 at 6:38 am
Too early on a Monday for this.
July 9, 2018 at 6:57 am
I can not run the code, the article "Splitting Strings in SQL Server 2016" explains this differently.
July 9, 2018 at 7:21 am
Yeah, yeah. The correct answer is "wrong".
But more importantly, what is it that you don't want to do, Steve?
July 9, 2018 at 8:26 am
When I executed this code in SQL Server 2016, below is the error:
Procedure expects parameter 'separator' of type 'nchar(1)/nvarchar(1)'
Thank You.
Regards,
Raghavender Chavva
Viewing 15 posts - 1 through 15 (of 23 total)
You must be logged in to reply to this topic. Login to reply