<?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>topic Importing fixed width file with embedded labels in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Importing-fixed-width-file-with-embedded-labels/m-p/178139#M45450</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;Any tips on importing fixed width files with embedded labels? I have a file like this and I'm seeing funny effects when I try to manipulate the fields. For example, I have :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Load @1:6,&lt;BR /&gt; @7:7 as Sign,&lt;BR /&gt; If(@7:7 = '-', 0 - @1:6, @1:6) as NewValue&lt;BR /&gt;FROM&lt;BR /&gt;C:\MyFile&lt;BR /&gt;(fix, codepage is 1252, embedded labels, header is 1 lines);&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;and I get the error message "Field names must be unique within table", but I am maintaining unique field names.&lt;/P&gt;&lt;P&gt;I'm wondering if it's best to avoid embedded lables and explicitly name each field. Any thoughts?&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jun 2010 12:42:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-06-07T12:42:27Z</dc:date>
    <item>
      <title>Importing fixed width file with embedded labels</title>
      <link>https://community.qlik.com/t5/QlikView/Importing-fixed-width-file-with-embedded-labels/m-p/178139#M45450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;Any tips on importing fixed width files with embedded labels? I have a file like this and I'm seeing funny effects when I try to manipulate the fields. For example, I have :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Load @1:6,&lt;BR /&gt; @7:7 as Sign,&lt;BR /&gt; If(@7:7 = '-', 0 - @1:6, @1:6) as NewValue&lt;BR /&gt;FROM&lt;BR /&gt;C:\MyFile&lt;BR /&gt;(fix, codepage is 1252, embedded labels, header is 1 lines);&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;and I get the error message "Field names must be unique within table", but I am maintaining unique field names.&lt;/P&gt;&lt;P&gt;I'm wondering if it's best to avoid embedded lables and explicitly name each field. Any thoughts?&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jun 2010 12:42:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Importing-fixed-width-file-with-embedded-labels/m-p/178139#M45450</guid>
      <dc:creator />
      <dc:date>2010-06-07T12:42:27Z</dc:date>
    </item>
    <item>
      <title>Importing fixed width file with embedded labels</title>
      <link>https://community.qlik.com/t5/QlikView/Importing-fixed-width-file-with-embedded-labels/m-p/178140#M45451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi tony,&lt;/P&gt;&lt;P&gt;you have renamed as @7:7 as sign and then u are using If(@7:7 = '-', 0 - @1:6, @1:6) as NewValue&lt;/P&gt;&lt;P&gt;this will not work because @7:7 has been renamed as sign and @7:7 no longer exists.if u use sign in place of @7:7 in your script ,that will also not work because sign is still being created in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can do a preceding load here&lt;/P&gt;&lt;P&gt;Load @1:6,If(Sign = '-', 0 - @1:6, @1:6) as NewValue;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;Load @1:6,&lt;BR /&gt; @7:7 as Sign,&lt;BR /&gt;FROM&lt;BR /&gt;C:\MyFile&lt;BR /&gt;(fix, codepage is 1252, embedded labels, header is 1 lines);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jun 2010 13:32:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Importing-fixed-width-file-with-embedded-labels/m-p/178140#M45451</guid>
      <dc:creator />
      <dc:date>2010-06-07T13:32:11Z</dc:date>
    </item>
    <item>
      <title>Importing fixed width file with embedded labels</title>
      <link>https://community.qlik.com/t5/QlikView/Importing-fixed-width-file-with-embedded-labels/m-p/178141#M45452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tauqueer,&lt;/P&gt;&lt;P&gt;Thanks for the reply. It seems to me like it's to do with the embedded titles. I have re-written the script specifying the field names explicitly, and this seems to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Load @1:6 as Value,&lt;BR /&gt; @7:7 as Sign,&lt;BR /&gt; If(@7:7 = '-', 0 - @1:6, @1:6) as NewValue&lt;BR /&gt; &lt;STRONG&gt;(fix, codepage is 1252, header is 2 lines);&lt;/STRONG&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;Tony&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jun 2010 09:36:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Importing-fixed-width-file-with-embedded-labels/m-p/178141#M45452</guid>
      <dc:creator />
      <dc:date>2010-06-08T09:36:32Z</dc:date>
    </item>
  </channel>
</rss>

