Home > Back-end >  BigQuery: Extract everything between first and fourth underscore
BigQuery: Extract everything between first and fourth underscore

Time:11-30

So lets say I have this string "this_is_a_string_test"

I want to extract "is_a_string".

How would I do that? Using SPLIT and OFFSET I can very easily extract a single part, but I wanna extract everything between the first and fourth underscore. I suppose I could use CONCAT, but I was wondering if there is a cleaner way of doing it

CodePudding user response:

Try enter image description here

  • Related