I'm trying to clean Full_Name data for a column I have in SQL. I am a complete beginner in SQL, just started learning a while ago.#
There are only three records in the Full_Name column of a table that consists of only that three records:
The NumberTwo Store [PARENT] : [DIST] The NumberOne Store
The NumberTwo Store [PARENT] : [ESTORE] AGM122358896 John Doe
AGM1223554489 Jim Doe
I would like to write a formula that shows the following values, the name at the end of the strings in the records:
The NumberOne Store
As I mentioned, I'm a beginner, below you can see what I've tried.
select ,Full_Name ,replace(substring(Full_Name,CHARINDEX (']', Full_Name), LEN(FULL_NAME)),']',' ') as GoodName2 from table
I expect the output to be the values after the last (integer+space key) or if there's no integer then after the last (bracket + space key)
This is my first post here, I hope it's alright.