Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

How to remove a string from a column

$
0
0

Hello All,

I have a Property table which has a column called Address. I want to remove the state and post code from all the records in the column Address. I just want to use it for a report and DO NOT want to update the column so this will be a SELECT statement.

Address
56 Kincumber Road BONNYRIGG NSW 2177
34 Diamond Crescent BONNYRIGG NSW 2177
1 Stott Close BONNYRIGG NSW 2177
2/290 Canley Vale Road CANLEY HEIGHTS NSW 2166
1/290 Canley Vale Road CANLEY HEIGHTS NSW 2166

Final Out Put
56 Kincumber Road BONNYRIGG
34 Diamond Crescent BONNYRIGG
1 Stott Close BONNYRIGG
2/290 Canley Vale Road CANLEY HEIGHTS
1/290 Canley Vale Road CANLEY HEIGHTS

Thanks

JAG


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>