Hi, having trouble coming up with search parameters for this issue, so I can't find an answer on my own.
Column X | Message (info 1) | Message (info 2) (info 1) |
Above is the contents of one column I need to handle. The result of the query should be the part INSIDE the parentheses only. Problem is, there's one program that saves two sets of information in parentheses, in which case the LATTER (info 1) is the one we want in the first column, in addition to which we must add a second column for info 2.
So I'm imagining I need to combine an if clause with a variable I can depend on to count how many left parentheses there are, for example. If left_parentheses = 2, Then .... Else If left_parentheses = 1, Then ....
But I don't know how to do that in SQL, and I also don't know how to separate between info 1 / 2 in the example.
The result from the example would look like this:
Column 1 | Column 2 Info 1 | Info 1 | Info 2
As usual, I'll try to look for the answer while waiting for tips here. Thanks!