<?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 column in table in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126325#M887280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vibhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also try,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Order:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; *, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Col1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Col3&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;Select Col1,Col2&lt;BR /&gt;FROM&lt;BR /&gt;Order; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Sep 2016 03:13:31 GMT</pubDate>
    <dc:creator>tamilarasu</dc:creator>
    <dc:date>2016-09-01T03:13:31Z</dc:date>
    <item>
      <title>adding column in table in script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126323#M887278</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;I have table created from SQL query in the script , I want to add an extra column in this table , this column is based on Previous function in Qlikview , bellow is an example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Order:&lt;/P&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;P&gt;Select Col1,Col2&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;Order;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to add below third column in Order table inside script so final table should have three columns&lt;/P&gt;&lt;P&gt;Col3=Previous(Col1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126323#M887278</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: adding column in table in script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126324#M887279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Temp&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col1,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;From OrderDB;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Peek(Col1) as Col3&lt;/P&gt;&lt;P&gt;Resident &lt;SPAN style="font-size: 13.3333px;"&gt;Temp&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Order By Col1 asc &lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 03:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126324#M887279</guid>
      <dc:creator>johnca</dc:creator>
      <dc:date>2016-09-01T03:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: adding column in table in script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126325#M887280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vibhu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also try,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Order:&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; *, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Previous&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Col1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Col3&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;Select Col1,Col2&lt;BR /&gt;FROM&lt;BR /&gt;Order; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 03:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126325#M887280</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-09-01T03:13:31Z</dc:date>
    </item>
    <item>
      <title>Re: adding column in table in script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126326#M887281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vibhu, Previuos with order by don't works as exprected sometimes, use peek better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Order)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Peek(Col2) as Col3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;RESIDENT Order&lt;/P&gt;&lt;P&gt;ORDER BY Col1, Col2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 06:47:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126326#M887281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-01T06:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: adding column in table in script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126327#M887282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manuel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any example that shows the behaviour.? I would like to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 06:59:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126327#M887282</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-09-01T06:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: adding column in table in script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126328#M887283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tamil,&lt;/P&gt;&lt;P&gt;When you load a resident table with a previous statement, and you order your table at the same load statement, previous don't works as expected, because order by is done later than previous, peek is calculated after order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 07:16:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126328#M887283</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-01T07:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: adding column in table in script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126329#M887284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As elegant as the preceding load looks, my solution seems the simplest...and works. BTW, I did forget one comma after Col2 in the resident load, so the code should look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Temp&lt;/SPAN&gt;:&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Select&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col1,&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;From Order;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Order:&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;NoConcatenate&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col1,&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Col2,&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Peek(Col1) as Col3&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Resident &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Temp&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Order By Col1 asc &lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Drop Table Temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 11:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126329#M887284</guid>
      <dc:creator>johnca</dc:creator>
      <dc:date>2016-09-01T11:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: adding column in table in script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126330#M887285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;I don't do a preceding load, I am doing a left join to join all data in the same table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 12:39:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126330#M887285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-01T12:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: adding column in table in script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126331#M887286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right Manuel, but Tamil's does, and is to what I was referring to. I responded to the wrong suggested solution...sorry about that. Your solution indeed looks simpler, but is a left join more efficient than my solution, especially for large data sets? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--john&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 14:49:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126331#M887286</guid>
      <dc:creator>johnca</dc:creator>
      <dc:date>2016-09-01T14:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: adding column in table in script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126332#M887287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thank you, Manuel. I will test this tomorrow. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Sep 2016 14:49:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-column-in-table-in-script/m-p/1126332#M887287</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-09-01T14:49:43Z</dc:date>
    </item>
  </channel>
</rss>

