The goal is that if the message begins with "V22200" (ex. row 2) I want to stuff/concatenate each of subsequent rows until the next "V22200" into a new column labeled "Transaction" (Only the message data would be stuffed Basically pivoting ROWID 2-8 each into a separate column.
The next occurrence of "V22200" indicates a new transaction.
I need to loop through the entire dataset - how do I write this in SNOWSQL in snowflake?
