I am a small business owner who self-taught SQL Server to manage mailing data. This resource has helped me so many times in the past looking at other folks questions, however, this is the first time asking a question. Using SQL Server 2017.
In the address column I want to change abbreviations to spelled out words. For example, I want to change 'St' to 'Street'. I know how to do a basic find and replace in T-SQL, but what I am running into is that if 'St' is in the name of the actual street name, it is getting changed as well. For example, '123 Stripe St' becomes '123 Streetripe Street'. My desired output would be '123 Stripe Street'.
I am using the following
UPDATE Person
SET Addr = REPLACE(Addr, 'St', 'Street')
WHERE Addr like '%St'
Can someone please help me to replace just the abbreviated part of the address?
Any help is very much appreciated.