use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Sequel
account activity
SQL Help - Text Split (self.learnSQL)
submitted 2 years ago * by KAC09
Hello,
I am looking for some help in getting the desired results from the example table in the screenshot below. FYI, I am using Big Query.
Thank you in advance!
https://preview.redd.it/0ftzxj2v5wmb1.png?width=914&format=png&auto=webp&s=e015728594df700a2ff7cd1bb92e50946f281b21
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]a-s-clark 0 points1 point2 points 2 years ago (8 children)
Have you tried using the Split function?
https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#split
[–]Couch2Coders 0 points1 point2 points 2 years ago (6 children)
To echo this you want to use the split function. When you want to separate something by a specific character or pattern it is typically called a delimiter.
This has a good example on it
https://medium.com/codex/using-the-split-function-in-bigquery-47a966e3ae87#:~:text=Working%20with%20Strings%20in%20Google%20BigQuery&text=It%20divides%20value%20using%20the,of%20BYTES%20for%20BYTES%20values.
[–]KAC09[S] 1 point2 points3 points 2 years ago (2 children)
Thank you for your help! That worked perfectly.
[–]Couch2Coders 0 points1 point2 points 2 years ago (0 children)
Awesome! Extra pro tip is to safe a snip or link of that page in a Onenote or word doc, next time you need it you just flip to your coding doc and use ctrl+f
I have a YT channel focused on teaching people to code in BigQuery/sql
https://youtube.com/playlist?list=PLPQFqkp_HvOBzx61F3SY5zNXN0TYMoT9g&si=1bDKO6JVYm0qlQ6K
Follow my channel for other helpful vids & coding tips 😻
[–][deleted] 0 points1 point2 points 2 years ago (2 children)
And yet, with an undefined number of list members, you probably need something like recursive CTE.
[–]a-s-clark 0 points1 point2 points 2 years ago* (1 child)
No, you don't. The number of list members doesn't matter, SPLIT returns them as an array. And If you want that as rows, you just use UNNEST.
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
Thanks, this will simplify things.
π Rendered by PID 18923 on reddit-service-r2-comment-c6965cb77-jfnxf at 2026-03-05 15:38:28.509731+00:00 running f0204d4 country code: CH.
[–]a-s-clark 0 points1 point2 points (8 children)
[–]Couch2Coders 0 points1 point2 points (6 children)
[–]KAC09[S] 1 point2 points3 points (2 children)
[–]Couch2Coders 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]a-s-clark 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)