Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
capriman
Starting Member
4 Posts |
Posted - 2011-12-10 : 08:35:24
|
SELECT REGEXP_REPLACE(STREET_ADDRESS,'St','Street')"REGEXP_PLACE"FROM LOCATIONS;using the above I am getting if the street_address already has the word Street in it it makes it Streeteet - so it grabs the St from the beginning and replaces it with Street - I want to ONLY replace if it is JUST St not mess with Street. Anyway I can modify above to handle this??thanks |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-12-10 : 08:45:12
|
Are you using MS SQL Server or Oracle ? KH[spoiler]Time is always against us[/spoiler] |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-10 : 11:38:50
|
maybe this small tweak?SELECTREGEXP_REPLACE(STREET_ADDRESS,'St ','Street ')"REGEXP_PLACE"FROM LOCATIONS; ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|