Skip to content

Commit 944b6d8

Browse files
authored
Update 2024-07-09-fun-with-unicode-in-sql-queries.md
1 parent e91782f commit 944b6d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_posts/2024-07-09-fun-with-unicode-in-sql-queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ SELECT REPLICATE(N'█', CONVERT(int, FLOOR((1 - @pct) * @barwidth)))
145145

146146
## Use as a delimiter
147147

148-
I'm pretty sure I stole this idea from Adam Bertrand, but I can't seem to find the post. The idea is to use a Unicode character that has a very unlikely chance of occurring in your data to use as a split point / delimiter.
148+
I stole [this one from Aaron Bertrand](https://www.mssqltips.com/sqlservertip/4940/dealing-with-the-singlecharacter-delimiter-in-sql-servers-stringsplit-function/){:target="_blank"}. The idea is to use a Unicode character that has a very unlikely chance of occurring in your data to use as a split point / delimiter.
149149

150150
The article I stole it from uses `nchar(9999)`, which is just this ``, a pencil, so that's also what I happen to use now. You could pick from thousands of other characters as long as it's not going to show up in your (hopefully clean) data.
151151

0 commit comments

Comments
 (0)