<?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: SQL in script, metadata, overtime trend observation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-in-script-metadata-overtime-trend-observation/m-p/1284797#M869829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you used a join instead of concatenate then that's possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Dec 2016 10:01:50 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-12-06T10:01:50Z</dc:date>
    <item>
      <title>SQL in script, metadata, overtime trend observation</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-in-script-metadata-overtime-trend-observation/m-p/1284794#M869826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some tricky project that I have to do.&lt;/P&gt;&lt;P&gt;it is presenting the trend of something over time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a big dataset and I want to present the status of the dataset.&lt;/P&gt;&lt;P&gt;so I have SQL query that looks like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select count(*) from dataset.&lt;/P&gt;&lt;P&gt;select count(*) from dataset where ~~~&lt;/P&gt;&lt;P&gt;select count(*) from dataset where ~~~ and ~~~&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;each of these queries gives a snapshot of how the dataset looks like.&lt;/P&gt;&lt;P&gt;but I have to present a trend of the snapshot. so I will run the calculation each day and I hope to add one additional row per day&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;date&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;total_row&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;number_of_rows_of_category1&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;SPAN style="color: #ffffff; font-size: 13.3333px; text-align: center; background-color: #6690bc;"&gt;number_of_rows_of_category2&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;SPAN style="color: #ffffff; font-size: 13.3333px; text-align: center; background-color: #6690bc;"&gt;number_of_rows_of_category3&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;P&gt;20131201&lt;/P&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;20131202&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;something that looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I was planning to take these following steps&lt;/P&gt;&lt;P&gt;1. connect the SQL database to QVD Creator&lt;/P&gt;&lt;P&gt;2. somehow save all the result of calculations into a variable&lt;/P&gt;&lt;P&gt;3. make the variable each column of the data table&lt;/P&gt;&lt;P&gt;4. do an increment load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the vague idea that I had in my mind but this does not look promising for few reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. SQL query does not seem to be running well &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;2. eventhough I successfully get that result from the query, it will be in a form of table. it will be just 1x1 table but still it is a table so I am wonder how I will be able to put that into a number format so that the variable will be holding a number value.&lt;/P&gt;&lt;P&gt;3. how do I create a table with each variable as a column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please give me an advice on any of the process. I want to make progress after getting some advice.&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>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-in-script-metadata-overtime-trend-observation/m-p/1284794#M869826</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: SQL in script, metadata, overtime trend observation</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-in-script-metadata-overtime-trend-observation/m-p/1284795#M869827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can concatenate the results of each query to get a table with all the results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ResultTable:&lt;/P&gt;&lt;P&gt;select count(*), 'category1' as category, sysdate() as date from dataset;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE(ResultTable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select count(*),&amp;nbsp; 'category2' as category, sysdate() as date from dataset where ~~~ ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE(ResultTable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select count(*),&amp;nbsp; 'category3' as category, sysdate() as date from dataset where ~~~ and ~~~ ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the field category that's created as a dimension in for example a pivot table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 09:11:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-in-script-metadata-overtime-trend-observation/m-p/1284795#M869827</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-06T09:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: SQL in script, metadata, overtime trend observation</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-in-script-metadata-overtime-trend-observation/m-p/1284796#M869828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you gysbert!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outer join worked well for me and I got the table in the format that I wanted.&lt;/P&gt;&lt;P&gt;I have a follow up questions.&lt;/P&gt;&lt;P&gt;do you think I can create another column of category 4 by getting the value of category 1 - category 2??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 09:57:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-in-script-metadata-overtime-trend-observation/m-p/1284796#M869828</guid>
      <dc:creator />
      <dc:date>2016-12-06T09:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: SQL in script, metadata, overtime trend observation</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-in-script-metadata-overtime-trend-observation/m-p/1284797#M869829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you used a join instead of concatenate then that's possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 10:01:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-in-script-metadata-overtime-trend-observation/m-p/1284797#M869829</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-12-06T10:01:50Z</dc:date>
    </item>
  </channel>
</rss>

