electroly / sqlnotebook

Casual data exploration in SQL
https://sqlnotebook.com
MIT License
590 stars 35 forks source link

SPLIT() is not working properly #34

Closed libinks10 closed 2 years ago

libinks10 commented 6 years ago

Please try below code :

DECLARE @data = SPLIT('AAA|BBB|CCC', '|', 1); select @data

Expecting the result as 'BBB' as per your documentation where we are getting 'System.Byte[]'

electroly commented 6 years ago

Hi, thank you for the bug report! I can reproduce this problem as well. It looks like it is returning an array with ('AAA', 'BBB', 'CCC') instead of returning the result at index 1. I will fix this.