<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; TRIM() Function &#8211; UDF TRIM()</title>
	<atom:link href="http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 08:55:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: iswariya</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-240182</link>
		<dc:creator><![CDATA[iswariya]]></dc:creator>
		<pubDate>Wed, 18 Jan 2012 11:49:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-240182</guid>
		<description><![CDATA[i need replace Single Quotes :
my input is : who&#039;s,this,book&#039;s
i want the output is : whos
                                 this
                                 books]]></description>
		<content:encoded><![CDATA[<p>i need replace Single Quotes :<br />
my input is : who&#8217;s,this,book&#8217;s<br />
i want the output is : whos<br />
                                 this<br />
                                 books</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-231213</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 04 Jan 2012 11:52:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-231213</guid>
		<description><![CDATA[You need to use PIVOT. Refer this
http://beyondrelational.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspx]]></description>
		<content:encoded><![CDATA[<p>You need to use PIVOT. Refer this<br />
<a href="http://beyondrelational.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspx" rel="nofollow">http://beyondrelational.com/blogs/madhivanan/archive/2008/08/27/dynamic-pivot-in-sql-server-2005.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sahil</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-225759</link>
		<dc:creator><![CDATA[Sahil]]></dc:creator>
		<pubDate>Sun, 25 Dec 2011 21:46:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-225759</guid>
		<description><![CDATA[Hi,
I am using SQL 2008, and am trying to insert value from table 1 to table 2 with multi records from table1 column “Description” and would like to populate in 1 unique record into table 2.

I have given an example below; 

TABLE 1

PATIENT_ID	DESCCRIPTION	

2771		MOTRIN TAB		
2771		TYLENOLTAB          
2771		ZANTAC TAB      

2775		ABC TAB		
2775		123 TAB          
2775		XYZ TAB

Example: Copy values from table 1 into table 2 with single row;

TABLE 2

PATIENT_ID	DESCRIPTION

2771		MOTRIN TAB,TYLENOL TAB,ZANTAC TAB
2775		ABC TAB, 123 TAB, XYZ TAB

Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
I am using SQL 2008, and am trying to insert value from table 1 to table 2 with multi records from table1 column “Description” and would like to populate in 1 unique record into table 2.</p>
<p>I have given an example below; </p>
<p>TABLE 1</p>
<p>PATIENT_ID	DESCCRIPTION	</p>
<p>2771		MOTRIN TAB<br />
2771		TYLENOLTAB<br />
2771		ZANTAC TAB      </p>
<p>2775		ABC TAB<br />
2775		123 TAB<br />
2775		XYZ TAB</p>
<p>Example: Copy values from table 1 into table 2 with single row;</p>
<p>TABLE 2</p>
<p>PATIENT_ID	DESCRIPTION</p>
<p>2771		MOTRIN TAB,TYLENOL TAB,ZANTAC TAB<br />
2775		ABC TAB, 123 TAB, XYZ TAB</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-218537</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Thu, 15 Dec 2011 14:53:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-218537</guid>
		<description><![CDATA[It means that the empcode has spaces as part of it. You need to use trim functions]]></description>
		<content:encoded><![CDATA[<p>It means that the empcode has spaces as part of it. You need to use trim functions</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zubius</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-216823</link>
		<dc:creator><![CDATA[Zubius]]></dc:creator>
		<pubDate>Tue, 13 Dec 2011 13:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-216823</guid>
		<description><![CDATA[Abdul -
SELECT *
 FROM Employee
  Where empcode LIKE  ‘%E123%′]]></description>
		<content:encoded><![CDATA[<p>Abdul -<br />
SELECT *<br />
 FROM Employee<br />
  Where empcode LIKE  ‘%E123%′</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abdul Awwal Chaudhary</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-212629</link>
		<dc:creator><![CDATA[Abdul Awwal Chaudhary]]></dc:creator>
		<pubDate>Wed, 07 Dec 2011 08:46:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-212629</guid>
		<description><![CDATA[If I use 
SELECT * 
FROM Employee
Where LTRIM(RTRIM((empcode)) = &#039;E123&#039;

It return the result but if I omit the LTRIM and RTRIM , it shows no record found.
How to get the result without using LTRIM and RTRIM]]></description>
		<content:encoded><![CDATA[<p>If I use<br />
SELECT *<br />
FROM Employee<br />
Where LTRIM(RTRIM((empcode)) = &#8216;E123&#8242;</p>
<p>It return the result but if I omit the LTRIM and RTRIM , it shows no record found.<br />
How to get the result without using LTRIM and RTRIM</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hemant Ramteke</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-188271</link>
		<dc:creator><![CDATA[Hemant Ramteke]]></dc:creator>
		<pubDate>Fri, 04 Nov 2011 11:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-188271</guid>
		<description><![CDATA[In sql server TRIM function not found to trim data , but it provides LTRIM for left trim &amp; RTRIM for right trim .]]></description>
		<content:encoded><![CDATA[<p>In sql server TRIM function not found to trim data , but it provides LTRIM for left trim &amp; RTRIM for right trim .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hemant Ramteke</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-188268</link>
		<dc:creator><![CDATA[Hemant Ramteke]]></dc:creator>
		<pubDate>Fri, 04 Nov 2011 11:30:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-188268</guid>
		<description><![CDATA[select  LTRIM(RTRIM(columnname)) as outputcolumn from tablename]]></description>
		<content:encoded><![CDATA[<p>select  LTRIM(RTRIM(columnname)) as outputcolumn from tablename</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cusman78</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-179720</link>
		<dc:creator><![CDATA[cusman78]]></dc:creator>
		<pubDate>Mon, 17 Oct 2011 01:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-179720</guid>
		<description><![CDATA[Try:
SELECT REPLACE(&#039; All  m y spaces    will be re moved &#039;,&#039; &#039;,&#039;&#039;)]]></description>
		<content:encoded><![CDATA[<p>Try:<br />
SELECT REPLACE(&#8216; All  m y spaces    will be re moved &#8216;,&#8217; &#8216;,&#8221;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: friendlink1</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-168987</link>
		<dc:creator><![CDATA[friendlink1]]></dc:creator>
		<pubDate>Sat, 17 Sep 2011 08:30:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-168987</guid>
		<description><![CDATA[I have to bind a nvarchar column to sql reporting services, and need to format it, if it has space between the 2 lines. Kindly help me how to do it?]]></description>
		<content:encoded><![CDATA[<p>I have to bind a nvarchar column to sql reporting services, and need to format it, if it has space between the 2 lines. Kindly help me how to do it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-153123</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 03 Aug 2011 11:11:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-153123</guid>
		<description><![CDATA[You cannot use trim function to remove a comma. Use replace function

select replace(col,&#039;,&#039;,&#039;&#039;) from table]]></description>
		<content:encoded><![CDATA[<p>You cannot use trim function to remove a comma. Use replace function</p>
<p>select replace(col,&#8217;,',&#8221;) from table</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: H.Phaninder Reddy</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-153016</link>
		<dc:creator><![CDATA[H.Phaninder Reddy]]></dc:creator>
		<pubDate>Wed, 03 Aug 2011 06:08:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-153016</guid>
		<description><![CDATA[How can i remove middle characters from a string?
eg: phaninder,reddy is a name........i would like to remove &#039;,&#039; from this name using trim function..pls give me the query.....]]></description>
		<content:encoded><![CDATA[<p>How can i remove middle characters from a string?<br />
eg: phaninder,reddy is a name&#8230;&#8230;..i would like to remove &#8216;,&#8217; from this name using trim function..pls give me the query&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arunkumar</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-151043</link>
		<dc:creator><![CDATA[Arunkumar]]></dc:creator>
		<pubDate>Wed, 27 Jul 2011 12:50:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-151043</guid>
		<description><![CDATA[Hi..I&#039;m facing a problem from containstable in sql server.I wrote a search procedure including containstable.the results came fine.but i&#039;m facing problem with the search strings &quot;all&quot; and &quot;h&amp;a&quot;.i didn&#039;t got  any result when using these strings.but in table keywords(All and H&amp;A) is there can u please help to me for avoid the problem.]]></description>
		<content:encoded><![CDATA[<p>Hi..I&#8217;m facing a problem from containstable in sql server.I wrote a search procedure including containstable.the results came fine.but i&#8217;m facing problem with the search strings &#8220;all&#8221; and &#8220;h&amp;a&#8221;.i didn&#8217;t got  any result when using these strings.but in table keywords(All and H&amp;A) is there can u please help to me for avoid the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jyothsna</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-151000</link>
		<dc:creator><![CDATA[jyothsna]]></dc:creator>
		<pubDate>Wed, 27 Jul 2011 08:37:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-151000</guid>
		<description><![CDATA[Hi.
 I am using MS SQL 2008.  I have a table X in DB which has some y columns. One of the column values has spaces suffixed and LTRIM, RTRIM is not working. Please let me kow if there is any other way to get rid of spaces.]]></description>
		<content:encoded><![CDATA[<p>Hi.<br />
 I am using MS SQL 2008.  I have a table X in DB which has some y columns. One of the column values has spaces suffixed and LTRIM, RTRIM is not working. Please let me kow if there is any other way to get rid of spaces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uday</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-146647</link>
		<dc:creator><![CDATA[Uday]]></dc:creator>
		<pubDate>Thu, 07 Jul 2011 12:43:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-146647</guid>
		<description><![CDATA[Hi Pinal,

I am having an issue while trimming the below word.

   ETF factsheets request   

Select RTrim(Len(Comments)), Comments from De_Activity Where [ID] = 1470
Select LTrim(Len(Comments)), LTrim(Comments) from De_Activity Where [ID] = 1470

Total length of string is 28 (Sql). But when I do the trim in excel I get len as 22.

I have used charindex to find &#039;E&#039;, output was 4.
So there are 3 spaces before E, but are not getting trimmed.

Regards,
Uday]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I am having an issue while trimming the below word.</p>
<p>   ETF factsheets request   </p>
<p>Select RTrim(Len(Comments)), Comments from De_Activity Where [ID] = 1470<br />
Select LTrim(Len(Comments)), LTrim(Comments) from De_Activity Where [ID] = 1470</p>
<p>Total length of string is 28 (Sql). But when I do the trim in excel I get len as 22.</p>
<p>I have used charindex to find &#8216;E&#8217;, output was 4.<br />
So there are 3 spaces before E, but are not getting trimmed.</p>
<p>Regards,<br />
Uday</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ahmad</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-146117</link>
		<dc:creator><![CDATA[Ahmad]]></dc:creator>
		<pubDate>Tue, 05 Jul 2011 12:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-146117</guid>
		<description><![CDATA[why not just do LTRIM(RTRIM(COLUMN_NAME)) ?]]></description>
		<content:encoded><![CDATA[<p>why not just do LTRIM(RTRIM(COLUMN_NAME)) ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-140205</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Fri, 10 Jun 2011 08:52:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-140205</guid>
		<description><![CDATA[select left(email,charindex(&#039;@&#039;,email)-1)]]></description>
		<content:encoded><![CDATA[<p>select left(email,charindex(&#8216;@&#8217;,email)-1)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nani</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-139346</link>
		<dc:creator><![CDATA[Nani]]></dc:creator>
		<pubDate>Tue, 07 Jun 2011 02:11:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-139346</guid>
		<description><![CDATA[hi this is nani,

Can anyone tell me how to get email id value with out alias name  like.. i hav id &quot;naresh@softsolvers.co.my&quot; i want only &quot;naresh&quot; for result.. 
please help..
thanq,]]></description>
		<content:encoded><![CDATA[<p>hi this is nani,</p>
<p>Can anyone tell me how to get email id value with out alias name  like.. i hav id &#8220;naresh@softsolvers.co.my&#8221; i want only &#8220;naresh&#8221; for result..<br />
please help..<br />
thanq,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soumyajyoti</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-135452</link>
		<dc:creator><![CDATA[Soumyajyoti]]></dc:creator>
		<pubDate>Fri, 20 May 2011 10:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-135452</guid>
		<description><![CDATA[I am using SQL SERVER 2005..
I am able to trim values using LTRIM with the following
SELECT LTRIM(&#039;  ZAM000000017&#039;) it is giving proper value as ZAM000000017
But when I am trying to use Update Statement to update the value 
Update INTERMEDIATE_ISIN
Set ISIN_CODE = LTRIM(ISIN_CODE);

is not working.... !!!

Please help]]></description>
		<content:encoded><![CDATA[<p>I am using SQL SERVER 2005..<br />
I am able to trim values using LTRIM with the following<br />
SELECT LTRIM(&#8216;  ZAM000000017&#8242;) it is giving proper value as ZAM000000017<br />
But when I am trying to use Update Statement to update the value<br />
Update INTERMEDIATE_ISIN<br />
Set ISIN_CODE = LTRIM(ISIN_CODE);</p>
<p>is not working&#8230;. !!!</p>
<p>Please help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Navin</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-131279</link>
		<dc:creator><![CDATA[Navin]]></dc:creator>
		<pubDate>Tue, 26 Apr 2011 14:15:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-131279</guid>
		<description><![CDATA[Hello,

Can anyone tell me how to call any UDF without schema name?

I have created Trim function but while calling it my requirement is i should not use dbo.Trim instead i will be using Trim only. is there any way to do that?

I have tried creating sys.Trim also but it is throwing me error as 

The specified schema name “sys” either does not exist or you do not have permission to use it.

Can anyone tell me how to do this?]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Can anyone tell me how to call any UDF without schema name?</p>
<p>I have created Trim function but while calling it my requirement is i should not use dbo.Trim instead i will be using Trim only. is there any way to do that?</p>
<p>I have tried creating sys.Trim also but it is throwing me error as </p>
<p>The specified schema name “sys” either does not exist or you do not have permission to use it.</p>
<p>Can anyone tell me how to do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chenz</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-128684</link>
		<dc:creator><![CDATA[chenz]]></dc:creator>
		<pubDate>Wed, 13 Apr 2011 15:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-128684</guid>
		<description><![CDATA[While the trim() is convenient, it, as with all UDFs in SQL Server, can be a performance hog. Run the following and you can see a dramatic difference. I ran on SQL Server 2008:

create function dbo.Trim
(
    @string varchar(max) 
)
returns varchar(max) as
begin
    
    return( rtrim(ltrim(@string)) );

end;
go

declare 
    @i integer = 0,
    @dummy varchar(10),
    @start datetime;


set @start = current_timestamp;
while (@i &lt; 10000) begin

    set @dummy = dbo.trim( &#039;  foo  bar  &#039;);
    set @i = @i + 1;

end;

print &#039;UDF: &#039; + cast(datediff( millisecond, @start, current_timestamp) as varchar);

set @i = 0;

set @start = current_timestamp;
while (@i &lt; 10000) begin

    set @dummy = rtrim(ltrim(&#039;  foo  bar  &#039;));
    set @i = @i + 1;

end;
print &#039;Built-ins: &#039; + cast(datediff( millisecond, @start, current_timestamp) as varchar);

My results consistently show the UDF taking about 30 times longer to perform.]]></description>
		<content:encoded><![CDATA[<p>While the trim() is convenient, it, as with all UDFs in SQL Server, can be a performance hog. Run the following and you can see a dramatic difference. I ran on SQL Server 2008:</p>
<p>create function dbo.Trim<br />
(<br />
    @string varchar(max)<br />
)<br />
returns varchar(max) as<br />
begin</p>
<p>    return( rtrim(ltrim(@string)) );</p>
<p>end;<br />
go</p>
<p>declare<br />
    @i integer = 0,<br />
    @dummy varchar(10),<br />
    @start datetime;</p>
<p>set @start = current_timestamp;<br />
while (@i &lt; 10000) begin</p>
<p>    set @dummy = dbo.trim( &#039;  foo  bar  &#039;);<br />
    set @i = @i + 1;</p>
<p>end;</p>
<p>print &#039;UDF: &#039; + cast(datediff( millisecond, @start, current_timestamp) as varchar);</p>
<p>set @i = 0;</p>
<p>set @start = current_timestamp;<br />
while (@i &lt; 10000) begin</p>
<p>    set @dummy = rtrim(ltrim(&#039;  foo  bar  &#039;));<br />
    set @i = @i + 1;</p>
<p>end;<br />
print &#039;Built-ins: &#039; + cast(datediff( millisecond, @start, current_timestamp) as varchar);</p>
<p>My results consistently show the UDF taking about 30 times longer to perform.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haripriya</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-123313</link>
		<dc:creator><![CDATA[Haripriya]]></dc:creator>
		<pubDate>Tue, 15 Mar 2011 10:48:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-123313</guid>
		<description><![CDATA[nice sir ... actually this much only my mind works... gr8...]]></description>
		<content:encoded><![CDATA[<p>nice sir &#8230; actually this much only my mind works&#8230; gr8&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-123293</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 15 Mar 2011 08:39:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-123293</guid>
		<description><![CDATA[Here are the shortcuts


select RIGHT(@hp,charindex(&#039;/&#039;,reverse(@hp))-1)
select RIGHT(@hp1,charindex(&#039;/&#039;,reverse(@hp1))-1)]]></description>
		<content:encoded><![CDATA[<p>Here are the shortcuts</p>
<p>select RIGHT(@hp,charindex(&#8216;/&#8217;,reverse(@hp))-1)<br />
select RIGHT(@hp1,charindex(&#8216;/&#8217;,reverse(@hp1))-1)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haripriya</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-122998</link>
		<dc:creator><![CDATA[Haripriya]]></dc:creator>
		<pubDate>Sat, 12 Mar 2011 10:53:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-122998</guid>
		<description><![CDATA[Hi dude..
For that use replace command....
that means replace space to no space...

eg:select replace(&#039; Hari priya &#039;,&#039; &#039;,&#039;&#039;)]]></description>
		<content:encoded><![CDATA[<p>Hi dude..<br />
For that use replace command&#8230;.<br />
that means replace space to no space&#8230;</p>
<p>eg:select replace(&#8216; Hari priya &#8216;,&#8217; &#8216;,&#8221;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haripriya</title>
		<link>http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-122997</link>
		<dc:creator><![CDATA[Haripriya]]></dc:creator>
		<pubDate>Sat, 12 Mar 2011 10:46:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/24/sql-server-trim-function-udf-trim/#comment-122997</guid>
		<description><![CDATA[Hi dude,

Pls avoid using # table. while ur server get restarted or any network issue u will lose ur table.. use table and finally truncate it... this wont occupy much space too... ur  coding correct anyhow..]]></description>
		<content:encoded><![CDATA[<p>Hi dude,</p>
<p>Pls avoid using # table. while ur server get restarted or any network issue u will lose ur table.. use table and finally truncate it&#8230; this wont occupy much space too&#8230; ur  coding correct anyhow..</p>
]]></content:encoded>
	</item>
</channel>
</rss>

