First post so I hope I get this right.
I have a address column (Street, City, State, Zip) that is delimited by " > " (space,greater than, space).
I do not understand Substring/Charindex syntax but I was able to use some old code of mine to split out the Street, City and Zip. I just can't seem to figure out the syntax for the state value.
At this point, I'm able to get "State > Zip" together but not sure how to split it out just for State.
SUBSTRING(full_address,CHARINDEX(' > ',full_address,CHARINDEX(' > ',full_address)+1)+3,LEN(full_address)) as State
I would appreciate any help with this syntax and if anyone can point me to a resource that explains the syntax (ELI5), that would be even more so appreciated.
Note: DBAs will not likely allow functions so I resorted to SUBSTR and CHARINDEX