We have a column that looks like this
CN=1245657,OU=TestOU,OU=East,OU=NorthPole,OU=Cali,OU=Computers,DC=test2,DC=Test1,DC=Test5
As you can see the string above has 5 OUs. The amount of OUs can range from 0 to 5 in the string. We need to make columns of the OU values. Like
OU1 OU2 OU3 OU4 OU5
----------------------------------------------
TestOU East NorthPole Cali Computers
In the event that the string has less than 5 OUs then OU5 will be blank. Is there a way to do this in plain SQL.