<?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 Re: How to create records from this file structure? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674419#M676540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;same thought ... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jun 2014 14:05:02 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2014-06-13T14:05:02Z</dc:date>
    <item>
      <title>How to create records from this file structure?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674412#M676530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to create records from linenumber 115 to 123, how do I do this as a script?&lt;/P&gt;&lt;P&gt;see the attached file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Håkan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 07:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674412#M676530</guid>
      <dc:creator />
      <dc:date>2014-06-13T07:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create records from this file structure?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674413#M676531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load Record&lt;/P&gt;&lt;P&gt;from delivery.txt&lt;/P&gt;&lt;P&gt;where SNo &amp;gt;= 115 and SNo &amp;lt;=123;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 07:57:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674413#M676531</guid>
      <dc:creator />
      <dc:date>2014-06-13T07:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to create records from this file structure?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674414#M676532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume that you have "records" that go over several lines; that the ID of the "record" is tagged with 115 and the following rows (up until 123) belong to the same "record". Then you can do something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; If(Trim(@1:4)='115', @5:n, Peek(RecordID)) as RecordID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(Trim(@1:4)='120', @5:n) as Attribute120,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(Trim(@1:4)='121', @5:n) as Attribute121,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(Trim(@1:4)='122', @5:n) as Attribute122,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(Trim(@1:4)='123', @5:n) as Attribute123,&lt;/P&gt;&lt;P&gt;&amp;nbsp; @1:4 as Tag,&lt;/P&gt;&lt;P&gt;&amp;nbsp; @5:n as Text&lt;/P&gt;&lt;P&gt;FROM delivery.txt (fix, codepage is 1252);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 08:00:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674414#M676532</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-06-13T08:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create records from this file structure?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674415#M676534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the table files wizard in QlikView and choose space as delimeter and qlikview will generate the following script&lt;/P&gt;&lt;P&gt;Load&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;@1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;@2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;C:\Users\ahijazi\Downloads\delivery.txt&lt;BR /&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;txt&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;codepage&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; 1252, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;no&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; spaces, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;msq&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;you can rename @1, and @2 in the wizard or here in the script &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;then you can add a where condition to the load statement where @1&amp;gt;=115 and @1 &amp;lt;=123&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 08:01:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674415#M676534</guid>
      <dc:creator>ali_hijazi</dc:creator>
      <dc:date>2014-06-13T08:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to create records from this file structure?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674416#M676535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works but I get a lot records with same ID but different content, see attachment.&lt;/P&gt;&lt;P&gt;I would like to have one unique record with all values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Håkan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 13:02:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674416#M676535</guid>
      <dc:creator />
      <dc:date>2014-06-13T13:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create records from this file structure?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674417#M676537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If(Trim(@1:4)='115', @5:n, Peek(RecordID)) as RecordID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 'Attribute' &amp;amp; Trim(@1:4) as Attribute,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; @4:n as AttributeValue&lt;/P&gt;&lt;P&gt;FROM delivery.txt (fix, codepage is 1252) Where Match(Trim(@1:4),115,120,121,122,123);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;Generic Load RecordID, Attribute, AttributeValue Resident Temp;&lt;/P&gt;&lt;P&gt;Drop Table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See more on &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2014/03/31/generic"&gt;Generic Load&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 13:39:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674417#M676537</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-06-13T13:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to create records from this file structure?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674418#M676539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Håkan&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another solution could be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_121892_Pic1.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/60583_QlikCommunity_Thread_121892_Pic1.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using this script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14026671666401184" jivemacro_uid="_14026671666401184"&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD If(Attr=100, Val, Peek(ID)) as ID, *;&lt;/P&gt;
&lt;P&gt;LOAD [@1:3] as Attr, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [@4:n] as Val&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FROM [&lt;/SPAN&gt;&lt;A class="" data-containerid="-1" data-containertype="-1" data-objectid="111006" data-objecttype="13" href="http://community.qlik.com/servlet/JiveServlet/download/2061-121892-548030-111006/delivery.txt"&gt;http://community.qlik.com/servlet/JiveServlet/download/548030-111006/delivery.txt&lt;/A&gt;&lt;SPAN&gt;] (fix, codepage is 1252)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Where [@1:3]&amp;gt;99 and [@1:3]&amp;lt;124;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;table2:&lt;/P&gt;
&lt;P&gt;Generic&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Attr'&amp;amp;Attr,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Val&lt;/P&gt;
&lt;P&gt;Resident table1;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table table1;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 13:46:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674418#M676539</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-06-13T13:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create records from this file structure?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674419#M676540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;same thought ... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jun 2014 14:05:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-records-from-this-file-structure/m-p/674419#M676540</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-06-13T14:05:02Z</dc:date>
    </item>
  </channel>
</rss>

