When you are required to import data received from different different file format such as .txt, .csv., or excel files, sometimes you see a white spaces along with the data, which may create a problem later.
If you want to delete whitespace around different lines of text in SQL Server Management Studio that can be done easily following below steps.
Lets see the sample data which contains white space, this data is copied from text file and paste into SQL Server Query Editor.
Lets view the white space first and later we will delete them.
Lets go to Edit menu in SSMS, after that click navigate to Advanced and select View White Space.
After clicking on View White Space, you can view white space in query editor window as shown below.
Now you can delete the white space, just select the text first as shown below.
Now go to Edit menu, navigate to Advanced then select Delete Horizontal White Space.
Once you click on Delete Horizontal White Space, you will see that white space are deleted.
1,215 total views, 1 views today