ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Remove all spaces from string in SQL Server<p>Hi <a class="username" rel="Waghmare"> Waghmare</a>,</p> <p>Please refer below query for hide extra spaces.</p> <p><span style="text-decoration: underline;"><strong>SQL</strong></span></p> <pre class="brush: sql">DECLARE @EmpData AS TABLE(EmpId VARCHAR(10),EmpName VARCHAR(200),EmpAddress VARCHAR(20),EmpMobile VARCHAR(10),EmpGrade VARCHAR(5),Dcode INT) INSERT INTO @EmpData VALUES(&#39;10001&#39;,&#39;test Name&#39;,&#39;malad&#39;,&#39;1464654&#39;,&#39;A&#39;,1) SELECT * FROM @EmpData SELECT REPLACE(REPLACE(REPLACE(EmpName,&#39; &#39;,&#39;&lt;&gt;&#39;),&#39;&gt;&lt;&#39;,&#39;&#39;),&#39;&lt;&gt;&#39;,&#39; &#39;)EmpName,EmpAddress,EmpMobile,EmpGrade,Dcode FROM @EmpData</pre> <p><span style="text-decoration: underline;"><strong>Screenshot</strong></span></p> <p><span style="text-decoration: underline;"><strong><img src="https://imgur.com/lhTmN6L.gif" alt="" width="457" height="154" /></strong></span></p>https://www.aspforums.net:443/Threads/274860/Remove-all-spaces-from-string-in-SQL-Server/https://www.aspforums.net:443/Threads/274860/Remove-all-spaces-from-string-in-SQL-Server/Fri, 02 Nov 2018 03:22:30 GMT