<?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: Adding a field to a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117947#M630338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you have a sample application+data to demonstrate the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example doesn't seem to show this behaviour:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_226020_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/132125_QlikCommunity_Thread_226020_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14691407699118837" jivemacro_uid="_14691407699118837"&gt;
&lt;P&gt;MyTable:&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as Myfield1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand()*100) as Myfield2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand()*100) as Myfield3&lt;/P&gt;
&lt;P&gt;AutoGenerate 20;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;MyNewTable:&lt;/P&gt;
&lt;P&gt;LOAD *, RECNO() as RecordID&lt;/P&gt;
&lt;P&gt;RESIDENT MyTable;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table MyTable;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&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>Thu, 21 Jul 2016 22:40:46 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2016-07-21T22:40:46Z</dc:date>
    <item>
      <title>Adding a field to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117943#M630332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table. For the sake of example, let's say it's created like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MyTable:&lt;/P&gt;&lt;P&gt;LOAD Myfield1, Myfield2, Myfield3&lt;/P&gt;&lt;P&gt;RESIDENT SomeOtherTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to add a sequential record number to the table, so I tried this:le:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MyNewTable:&lt;/P&gt;&lt;P&gt;LOAD *, RECNO() as RecordID&lt;/P&gt;&lt;P&gt;RESIDENT MyTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It added the RecordID field, but it used seemingly random values - 4, 8, 11, 15 instead of the expected 1,2,3,4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to get the desired result, I had to do this:&lt;/P&gt;&lt;P&gt;MyNewTable:&lt;/P&gt;&lt;P&gt;LOAD Myfield1, Myfield2, Myfield3, RECNO() as RecordID&lt;/P&gt;&lt;P&gt;RESIDENT MyTable;&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;&lt;P&gt;I consider this to be a bug (among the many other bugs your product has). Oh wait, the trainer refused to call stuff like this a "bug", preferring instead to call it a "nuance".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 14:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117943#M630332</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-21T14:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117944#M630333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Rowno() instead of RECNo()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 16:49:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117944#M630333</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-21T16:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117945#M630335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a where statement when you did a resident load??&lt;/P&gt;&lt;P&gt;What do you get when you use RowNo() instead of RecNo()?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;MyNewTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LOAD *, RowNo() as RecordID&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;RESIDENT MyTable;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 16:49:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117945#M630335</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-21T16:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117946#M630337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using the rowno() instead of record number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3896"&gt;RecNo or RowNo?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 16:53:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117946#M630337</guid>
      <dc:creator>vikramv</dc:creator>
      <dc:date>2016-07-21T16:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a field to a table</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117947#M630338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do you have a sample application+data to demonstrate the issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This example doesn't seem to show this behaviour:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_226020_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/132125_QlikCommunity_Thread_226020_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14691407699118837" jivemacro_uid="_14691407699118837"&gt;
&lt;P&gt;MyTable:&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as Myfield1,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand()*100) as Myfield2,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ceil(Rand()*100) as Myfield3&lt;/P&gt;
&lt;P&gt;AutoGenerate 20;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;MyNewTable:&lt;/P&gt;
&lt;P&gt;LOAD *, RECNO() as RecordID&lt;/P&gt;
&lt;P&gt;RESIDENT MyTable;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table MyTable;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&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>Thu, 21 Jul 2016 22:40:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-field-to-a-table/m-p/1117947#M630338</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-07-21T22:40:46Z</dc:date>
    </item>
  </channel>
</rss>

