<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: HANA Studio - SQL -Trim functio in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/hana-studio-sql-trim-functio/qaa-p/532055#M108161</link>
    <description>&lt;P&gt;Hi @Meenakshi Jayachandran&lt;/P&gt;
  &lt;P&gt;This is an example of what you need to do:&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;To create a table:&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;create column table "KABIL_PRACTICE"."TEST_EXP"
(
"ID" integer,
"Name" Nvarchar(10)
);
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;STRONG&gt;To insert a value into a table:&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;insert into "KABIL_PRACTICE"."TEST_EXP" values (1,' kabil'); -- the Name column contains blank space in front of the name
insert into "KABIL_PRACTICE"."TEST_EXP" values (1,' Arasan');
insert into "KABIL_PRACTICE"."TEST_EXP" values (2,'kabilan')
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/96402-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Try this code:&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;select trim (leading ' ' from "Name") from "KABIL_PRACTICE"."TEST_EXP"; -- here Name is a Column name&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;STRONG&gt; Result:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/96403-r1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;and Export the result.&lt;/P&gt;
  &lt;P&gt;and from your excel open it by navigate Data -&amp;gt; From text to the source file of the saved results it's like to be shown as below:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/96404-e.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Dec 2017 05:35:46 GMT</pubDate>
    <dc:creator>former_member383962</dc:creator>
    <dc:date>2017-12-04T05:35:46Z</dc:date>
    <item>
      <title>HANA Studio - SQL -Trim functio</title>
      <link>https://community.sap.com/t5/technology-q-a/hana-studio-sql-trim-functio/qaq-p/532054</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;
  &lt;P&gt;I'm new to HANA Studio Sql. I'm trying to trim a column and export results to excel.&lt;/P&gt;
  &lt;P&gt;I used Trim(' ', Col1) "Col1" in select. &lt;/P&gt;
  &lt;P&gt;I then Export Result&lt;/P&gt;
  &lt;P&gt;Open in excel using "From Text" open in the Data Tab. Choose ' delimited. But still see the trailing blanks.&lt;/P&gt;
  &lt;P&gt;I just want the trim result. &lt;/P&gt;
  &lt;P&gt;Thanks,&lt;/P&gt;
  &lt;P&gt;Meena&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2017 20:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hana-studio-sql-trim-functio/qaq-p/532054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-12-01T20:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: HANA Studio - SQL -Trim functio</title>
      <link>https://community.sap.com/t5/technology-q-a/hana-studio-sql-trim-functio/qaa-p/532055#M108161</link>
      <description>&lt;P&gt;Hi @Meenakshi Jayachandran&lt;/P&gt;
  &lt;P&gt;This is an example of what you need to do:&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;To create a table:&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;create column table "KABIL_PRACTICE"."TEST_EXP"
(
"ID" integer,
"Name" Nvarchar(10)
);
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;STRONG&gt;To insert a value into a table:&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;insert into "KABIL_PRACTICE"."TEST_EXP" values (1,' kabil'); -- the Name column contains blank space in front of the name
insert into "KABIL_PRACTICE"."TEST_EXP" values (1,' Arasan');
insert into "KABIL_PRACTICE"."TEST_EXP" values (2,'kabilan')
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/96402-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Try this code:&lt;/STRONG&gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;select trim (leading ' ' from "Name") from "KABIL_PRACTICE"."TEST_EXP"; -- here Name is a Column name&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;STRONG&gt; Result:&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/96403-r1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;and Export the result.&lt;/P&gt;
  &lt;P&gt;and from your excel open it by navigate Data -&amp;gt; From text to the source file of the saved results it's like to be shown as below:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/96404-e.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 05:35:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hana-studio-sql-trim-functio/qaa-p/532055#M108161</guid>
      <dc:creator>former_member383962</dc:creator>
      <dc:date>2017-12-04T05:35:46Z</dc:date>
    </item>
  </channel>
</rss>

