<?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 Peek function returning null after SQL statement. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Peek-function-returning-null-after-SQL-statement/m-p/161564#M35397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Had the exact same issue, thanks for adding your solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Apr 2011 10:32:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-08T10:32:24Z</dc:date>
    <item>
      <title>Peek function returning null after SQL statement.</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function-returning-null-after-SQL-statement/m-p/161562#M35395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the following code the peek command seems to stop working after the SQL select command.&lt;/P&gt;&lt;P&gt;For the second row vTable,vField &amp;amp; vDescr are set to Null when for k = 0 to $(y) is on it's second pass.&lt;/P&gt;&lt;P&gt;Any ideas why this is happening?&lt;/P&gt;&lt;P&gt;Mark&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;tmp:&lt;BR /&gt;load * inline [&lt;BR /&gt;TABLE, FIELD,DESCR&lt;BR /&gt;'ITMMASTER','ITMREF_0','Product'&lt;BR /&gt;'BPCUSTOMER','BPCNUM_0','Customer'&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;Counts:&lt;BR /&gt;LOAD Count(FIELD ) as Y&lt;BR /&gt;Resident tmp;&lt;BR /&gt;LET y = Peek('Y', 0) - 1;&lt;BR /&gt;DROP Table Counts;&lt;BR /&gt;&lt;BR /&gt;for k = 0 to $(y)&lt;BR /&gt;&lt;BR /&gt; LET vTable = PEEK('TABLE', $(k));&lt;BR /&gt; LET vTable = 'IDIS.' &amp;amp; vTable ;&lt;BR /&gt; LET vField = PEEK('FIELD', $(k));&lt;BR /&gt; LET vDescr = PEEK('DESCR', $(k));&lt;BR /&gt;&lt;BR /&gt; LOOKUPS:&lt;BR /&gt; SQL SELECT $(vField) AS LOOKUP_FIELD, '$(vTable)' AS LOOKUP_TABLE from $(vTable);&lt;BR /&gt;&lt;BR /&gt;NEXT k&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 13:06:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function-returning-null-after-SQL-statement/m-p/161562#M35395</guid>
      <dc:creator />
      <dc:date>2011-03-15T13:06:43Z</dc:date>
    </item>
    <item>
      <title>Peek function returning null after SQL statement.</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function-returning-null-after-SQL-statement/m-p/161563#M35396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I needed to explicitly set the table in peek, this has made it work.&lt;/P&gt;&lt;P&gt;LET vField = PEEK('FIELD', $(k),'TMP');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2011 13:21:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function-returning-null-after-SQL-statement/m-p/161563#M35396</guid>
      <dc:creator />
      <dc:date>2011-03-15T13:21:49Z</dc:date>
    </item>
    <item>
      <title>Peek function returning null after SQL statement.</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-function-returning-null-after-SQL-statement/m-p/161564#M35397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Had the exact same issue, thanks for adding your solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2011 10:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-function-returning-null-after-SQL-statement/m-p/161564#M35397</guid>
      <dc:creator />
      <dc:date>2011-04-08T10:32:24Z</dc:date>
    </item>
  </channel>
</rss>

