I have a beginners question in TSQL.
We imported Excel Sheets into a SQL Server 2008. Too bad these excel files were not formatted the way they should be. We want a phone number to look like this: '012345678', no leading and trailing whitespace and no whitespace within. Even worse sometimes the number is encoded with a prefix '0123-2349823' or '0123/2349823'.
Normally I would export the excel file to csv, then launch some magic perl script to do the cleaning and then reimport the excel file.
Still it would be interesting to know how to do stuff like this with TSQL.
Any ideas?