<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Eddie Awad’s Blog - Latest Comments in SQL Function Spotlight: TRIM</title><link>http://awads.disqus.com/</link><description>News, views, tips and tricks on Oracle and other fun stuff</description><atom:link href="https://awads.disqus.com/sql_function_spotlight_trim/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 07 Sep 2008 20:42:35 -0000</lastBuildDate><item><title>Re: SQL Function Spotlight: TRIM</title><link>http://awads.net/wp/2008/08/28/sql-function-spotlight-trim/#comment-3659576</link><description>&lt;p&gt;Thanks Brian. By the way, nice use of the &lt;a href="http://awads.net/wp/2006/01/12/cool-sql-function-dump/" rel="nofollow noopener" target="_blank" title="http://awads.net/wp/2006/01/12/cool-sql-function-dump/"&gt;DUMP function&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eddie Awad</dc:creator><pubDate>Sun, 07 Sep 2008 20:42:35 -0000</pubDate></item><item><title>Re: SQL Function Spotlight: TRIM</title><link>http://awads.net/wp/2008/08/28/sql-function-spotlight-trim/#comment-3659581</link><description>&lt;p&gt;So, TRIM and TO_CHAR seem the same by a DATE:&lt;/p&gt;&lt;p&gt;SELECT TRIM(SysDate),	 DUMP(TRIM(SysDate))	FROM Dual UNION ALL&lt;br&gt;SELECT TO_CHAR(SysDate), DUMP(TO_CHAR(SysDate))	FROM Dual;&lt;/p&gt;&lt;p&gt;05-SEP-08 Typ=1 Len=9: 48,53,45,83,69,80,45,48,56&lt;br&gt;05-SEP-08 Typ=1 Len=9: 48,53,45,83,69,80,45,48,56&lt;/p&gt;&lt;p&gt;TRUNC, however, leaves it as a DATE, which is possible the best way to remove the time.&lt;/p&gt;&lt;p&gt;SELECT SysDate,		DUMP(SysDate)		FROM Dual UNION ALL&lt;br&gt;SELECT TRUNC(SysDate),	DUMP(TRUNC(SysDate))	FROM Dual;&lt;/p&gt;&lt;p&gt;05-SEP-08 Typ=13 Len=8: 216,7,9,5,8,51,44,0&lt;br&gt;05-SEP-08 Typ=13 Len=8: 216,7,9,5,0,0,0,0&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brian Tkatch</dc:creator><pubDate>Fri, 05 Sep 2008 07:52:59 -0000</pubDate></item><item><title>Re: SQL Function Spotlight: TRIM</title><link>http://awads.net/wp/2008/08/28/sql-function-spotlight-trim/#comment-3659580</link><description>&lt;p&gt;Hmm! What is the difference between trim(sysdate) and to_char(sysdate)?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eddie Awad</dc:creator><pubDate>Thu, 04 Sep 2008 19:27:35 -0000</pubDate></item><item><title>Re: SQL Function Spotlight: TRIM</title><link>http://awads.net/wp/2008/08/28/sql-function-spotlight-trim/#comment-3659579</link><description>&lt;p&gt;I like using trim on dates. I have seen many elaborate ways of converting to char to remove it and then convert back to date. Using trim seems to be the slick way to just remove the time (making it zero).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mathias Magnusson</dc:creator><pubDate>Thu, 04 Sep 2008 15:25:27 -0000</pubDate></item><item><title>Re: SQL Function Spotlight: TRIM</title><link>http://awads.net/wp/2008/08/28/sql-function-spotlight-trim/#comment-3659577</link><description>&lt;p&gt;Indeed, if you want to trim more than one character on either or both ends of a string, TRIM is not the function to use.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eddie Awad</dc:creator><pubDate>Fri, 29 Aug 2008 12:27:01 -0000</pubDate></item><item><title>Re: SQL Function Spotlight: TRIM</title><link>http://awads.net/wp/2008/08/28/sql-function-spotlight-trim/#comment-3659578</link><description>&lt;p&gt;there is one major advantage of using ltrim (rtrim), with ltrim you can skip any character from a range, with trim the character is a single character  !&lt;br&gt;&lt;/p&gt;&lt;pre&gt;SQL&amp;gt; select ltrim('elcaroracle','racle') from dual&lt;br&gt;&lt;br&gt;LTRIM(&lt;br&gt;------&lt;br&gt;oracle&lt;br&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Laurent Schneider</dc:creator><pubDate>Fri, 29 Aug 2008 01:35:50 -0000</pubDate></item></channel></rss>