<?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 &amp; SQL in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147668#M26077</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Filed name here is a string in single quotes, so space doesn't matter. Brackets were assumed to be a part of the field name, I think.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jun 2009 23:24:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-06-25T23:24:14Z</dc:date>
    <item>
      <title>PEEK &amp; SQL</title>
      <link>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147664#M26073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can anyone point out my silly mistake in the code bellow it returns a NULL value each time, or is it not possible to use peek on a SQL loaded table, it seems to work fine if I load from a QVD. I assumed that once the record was loaded it would respond in the same way ...&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;Para1:&lt;BR /&gt;LOAD "curr-year" AS [Current Year],&lt;BR /&gt; "last-year" AS [Last Year],&lt;BR /&gt; "next-year" AS [Next Year],&lt;BR /&gt; "period-no" AS [Period],&lt;BR /&gt; "report-pd" AS [Report Period],&lt;BR /&gt; "report-wk" AS [Report Week],&lt;BR /&gt; "week" AS [Week];&lt;BR /&gt;SQL SELECT "curr-year", "last-year", "next-year", "period-no", "report-pd",&lt;BR /&gt; "report-wk", "week"&lt;BR /&gt;FROM PUB.para1;&lt;BR /&gt;LET vCurrentYear = year(peek('[Current Year]',1,'Para1'));&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 23:08:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147664#M26073</guid>
      <dc:creator />
      <dc:date>2009-06-24T23:08:19Z</dc:date>
    </item>
    <item>
      <title>PEEK &amp; SQL</title>
      <link>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147665#M26074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're using peek outside of SQL, so this part is fine. Table name here is not needed since you're using LET immideately after the Paral table. Try to remove brackets. And, if Current Year field is not in a date format, you don't need year() function:&lt;BR /&gt;LET vCurrentYear = peek('Current Year',1);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 23:16:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147665#M26074</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-24T23:16:57Z</dc:date>
    </item>
    <item>
      <title>PEEK &amp; SQL</title>
      <link>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147666#M26075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to Michael's suggestions:&lt;/P&gt;&lt;P&gt;1. check that you are actually getting data from your SQL statement and what are the field names.&lt;/P&gt;&lt;P&gt;2. Check that you don't have a previous load (from QVD, for example), that's loading the same fields into a different table name. Maybe your two tables are being automatically concatenated and this table name simply doesn't exist).&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 23:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147666#M26075</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-06-24T23:21:04Z</dc:date>
    </item>
    <item>
      <title>PEEK &amp; SQL</title>
      <link>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147667#M26076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin:0cm 0cm 10pt;"&gt;Thanks both for your reply, it turns out that the problem was the square brackets round the field name. My mistake, I was under the impression that this was used every time a field name contained a space.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 17:21:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147667#M26076</guid>
      <dc:creator />
      <dc:date>2009-06-25T17:21:23Z</dc:date>
    </item>
    <item>
      <title>PEEK &amp; SQL</title>
      <link>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147668#M26077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Filed name here is a string in single quotes, so space doesn't matter. Brackets were assumed to be a part of the field name, I think.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2009 23:24:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PEEK-SQL/m-p/147668#M26077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-25T23:24:14Z</dc:date>
    </item>
  </channel>
</rss>

