How do I do a replace that will select all address rows with "street", and replace with "st". I know all rows don't contain "street", so it should be best to select them first, right? I usually don't modify tables at this job, and want to make sure I get it right.
So far I saw sql replace, but it doesn't do a select of the rows/columns with "street" in them first. This one does a select/replace replace select.
My data is about 4500 rows long. Some are "street"=>st, "avenue"=>ave, "st."=>st, etc.
Can I just do a
SELECT address_1 as addr
REPLACE(addr, 'Street', 'St')
FROM table
Update: How do I keep it from changing 'Streets' to 'Sts'? Some addresses show two cross Streets and I'd like to keep them as Streets in that case.
Thanks!