<?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: Data from OLEDB Connection - Adding Columns in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394516#M459711</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As always, I would recommend to do aggregation or calculation in DB engine itself due to save the time and performance. And, Here I am not sure whether we followed you on single basis. But, Some analysis i was thinking this? Does this helps you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load * From &amp;lt;Source&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate(Sample)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load *, If([Last Connection] &amp;lt;= Today()-3, &lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection]&lt;/STRONG&gt;) as Flag, 'Less than 3 days' as FlagFilter Resident Sample where ID = 'ID1';&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Concatenate(Sample)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Load *, If(&lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection] &lt;/STRONG&gt;&amp;gt;= Today()-3 and &lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection] &lt;/STRONG&gt;&amp;lt;= Today()-7, &lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection]&lt;/STRONG&gt;) as Flag, '3-7 days' as FlagFilter Resident Sample where ID = 'ID2';&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Concatenate(Sample)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Load *, If(&lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection] &lt;/STRONG&gt;&amp;gt;= Today()-7, &lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection]&lt;/STRONG&gt;) as Flag, 'More than 7 days' as FlagFilter Resident Sample where ID = 'ID3';&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;In future, you can use FlagFilter for restriction with in the set analysis, If required &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Aug 2017 08:12:34 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2017-08-14T08:12:34Z</dc:date>
    <item>
      <title>Data from OLEDB Connection - Adding Columns</title>
      <link>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394515#M459710</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'm quite new to Qlikview - and was trying to make certain charts with some data I have. Some background about the issue I'm facing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am drawing my data from an Oracle Database using an OLEDB connection in the Edit Scripts area. Examples of what data I draw would be IDs of individuals, countries they are from, and when their last connection to a particular server was.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible for me to add a column to this extracted database, which involves calculation of the current time minus their last connection date? An example would be as below:&lt;/P&gt;&lt;P&gt;&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;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Country&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Last Connection&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Last Connection (New Column)&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ID1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Country1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;11:00:29 14/8/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Less than 3 days&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ID2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Country1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;12:05:11 10/8/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3 - 7 days&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ID3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Country2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;08:33:21 8/7/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;More than 7 days&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ID4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Country3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;03:12:34 14/8/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Less than 3 days&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of showing the exact date, I would like to add a column which is able to classify each of these times. I was able to create a new List Box with an expression using formulas to allow me to filter these results like the way I wanted in the fourth column, but I was unable to add this data into the Quick Chart Wizard as it was not part of any Tables, or was not recognized as a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a proper way to insert a column to data acquired in this way (via OLEDB connections)? Any help would be much appreciated, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Aug 2017 16:05:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394515#M459710</guid>
      <dc:creator />
      <dc:date>2017-08-13T16:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Data from OLEDB Connection - Adding Columns</title>
      <link>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394516#M459711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As always, I would recommend to do aggregation or calculation in DB engine itself due to save the time and performance. And, Here I am not sure whether we followed you on single basis. But, Some analysis i was thinking this? Does this helps you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load * From &amp;lt;Source&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate(Sample)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Load *, If([Last Connection] &amp;lt;= Today()-3, &lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection]&lt;/STRONG&gt;) as Flag, 'Less than 3 days' as FlagFilter Resident Sample where ID = 'ID1';&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Concatenate(Sample)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Load *, If(&lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection] &lt;/STRONG&gt;&amp;gt;= Today()-3 and &lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection] &lt;/STRONG&gt;&amp;lt;= Today()-7, &lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection]&lt;/STRONG&gt;) as Flag, '3-7 days' as FlagFilter Resident Sample where ID = 'ID2';&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Concatenate(Sample)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Load *, If(&lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection] &lt;/STRONG&gt;&amp;gt;= Today()-7, &lt;STRONG style="font-size: 13.3333px;"&gt;[Last Connection]&lt;/STRONG&gt;) as Flag, 'More than 7 days' as FlagFilter Resident Sample where ID = 'ID3';&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;In future, you can use FlagFilter for restriction with in the set analysis, If required &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 08:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394516#M459711</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-08-14T08:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Data from OLEDB Connection - Adding Columns</title>
      <link>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394517#M459712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;in front end, Expression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;()-&lt;SPAN style="color: #0000ff;"&gt;Floor&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Date#&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Last Connection]&lt;/SPAN&gt;,'hh:mm:ss DD/MM/YYYY'))) &amp;lt; 3,'Less than 3 days',&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;()-&lt;SPAN style="color: #0000ff;"&gt;Floor&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Date#&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Last Connection]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,'hh:mm:ss DD/MM/YYYY'))) &amp;gt; 7,'More than 7 days',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; '3 - 7 days')) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/173318_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Antonio&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 08:16:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394517#M459712</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-08-14T08:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Data from OLEDB Connection - Adding Columns</title>
      <link>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394518#M459713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could also use this Expression in Script to insert new Column, as Preceding Load&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;()-&lt;SPAN style="color: #0000ff;"&gt;Floor&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Date#&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Last Connection]&lt;/SPAN&gt;,'hh:mm:ss DD/MM/YYYY'))) &amp;lt; 3,'Less than 3 days',&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&gt;()-&lt;SPAN style="color: #0000ff;"&gt;Floor&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Date#&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Last Connection]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,'hh:mm:ss DD/MM/YYYY'))) &amp;gt; 7,'More than 7 days',&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; '3 - 7 days')) &lt;/SPAN&gt;&lt;/SPAN&gt; as NewColumn;&lt;/P&gt;&lt;P&gt;SQL Select * From Table;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Aug 2017 08:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394518#M459713</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-08-14T08:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Data from OLEDB Connection - Adding Columns</title>
      <link>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394519#M459714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Antonio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The formula had to be tweaked according to the data, but I managed to get it work by using the LOAD function in the script instead of creating a new list box with an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2017 05:32:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Data-from-OLEDB-Connection-Adding-Columns/m-p/1394519#M459714</guid>
      <dc:creator />
      <dc:date>2017-08-18T05:32:33Z</dc:date>
    </item>
  </channel>
</rss>

