<?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: Load last 3 years Data from Sql Select in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1579026#M739926</link>
    <description>&lt;P&gt;get the year from the field that contains the year info.&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2019 14:28:08 GMT</pubDate>
    <dc:creator>jwang2016</dc:creator>
    <dc:date>2019-05-10T14:28:08Z</dc:date>
    <item>
      <title>Load last 3 years Data from Sql Select</title>
      <link>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1578919#M739921</link>
      <description>&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;I am loading data from SQL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sql file contains data from 2004 but i need to load only last 3 years data. How can we do it?&lt;/P&gt;&lt;P&gt;Here is the script I am using&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;load&amp;nbsp;&lt;/P&gt;&lt;P&gt;CUSTID&amp;nbsp; &amp;nbsp; as&amp;nbsp; &amp;nbsp;[Customer Id],&lt;/P&gt;&lt;P&gt;CNAME&amp;nbsp; &amp;nbsp; as&amp;nbsp; &amp;nbsp; [Customer Name]&lt;/P&gt;&lt;P&gt;CJD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as&amp;nbsp; &amp;nbsp; [Customer Join Date] ;&amp;nbsp; &amp;nbsp; &amp;nbsp;CJD is in MM/DD/YYYY format&lt;/P&gt;&lt;P&gt;SQL Select&amp;nbsp;CUSTID&amp;nbsp; CNAME&amp;nbsp; CJD&amp;nbsp; from CUST&lt;/P&gt;&lt;P&gt;Where&amp;nbsp; &amp;nbsp; &amp;nbsp;year(CJD) &amp;gt; ='2017';&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;When I am loading data it's throwing an error.&amp;nbsp; Could some can guide me How to fetch last 3 years data in this case&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:53:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1578919#M739921</guid>
      <dc:creator>SatyaPaleti</dc:creator>
      <dc:date>2024-11-16T20:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Load last 3 years Data from Sql Select</title>
      <link>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1578934#M739922</link>
      <description>&lt;P&gt;Hello Satya,&lt;/P&gt;&lt;P&gt;I think this script should work:&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;load&amp;nbsp;&lt;/P&gt;&lt;P&gt;CUSTID&amp;nbsp; &amp;nbsp; as&amp;nbsp; &amp;nbsp;[Customer Id],&lt;/P&gt;&lt;P&gt;CNAME&amp;nbsp; &amp;nbsp; as&amp;nbsp; &amp;nbsp; [Customer Name]&lt;/P&gt;&lt;P&gt;CJD&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;as&amp;nbsp; &amp;nbsp; [Customer Join Date] ; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;SQL Select&amp;nbsp;&lt;/P&gt;&lt;P&gt;CUSTID, &amp;nbsp;CNAME, &amp;nbsp;CJD&amp;nbsp;&lt;/P&gt;&lt;P&gt;from CUST&lt;/P&gt;&lt;P&gt;Where &amp;nbsp; &amp;nbsp; TO_DATE(CJD, '&lt;SPAN&gt;MM/DD/YYYY&lt;/SPAN&gt;') &amp;gt; ='01/01/2017';&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another option in the SQL where is:&lt;/P&gt;&lt;P&gt;SQL Select&amp;nbsp;&lt;/P&gt;&lt;P&gt;CUSTID, &amp;nbsp;CNAME, &amp;nbsp;CJD&amp;nbsp;&lt;/P&gt;&lt;P&gt;from CUST&lt;/P&gt;&lt;P&gt;Where &amp;nbsp; &amp;nbsp;EXTRACT(YEAR FROM CJD) = '2017';&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 11:57:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1578934#M739922</guid>
      <dc:creator>ignacio_pena</dc:creator>
      <dc:date>2019-05-10T11:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Load last 3 years Data from Sql Select</title>
      <link>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1578987#M739923</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you so much for your response.&amp;nbsp; I have used both of your queries but still code is not getting executed. Following error I am facing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/QTQVC/OPEN_STREAM failed after 00:00:00 Key = SQL_ERROR (ID:00 Type:E Number:001 Comma without preceding colon (after OPEN ?).)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 13:20:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1578987#M739923</guid>
      <dc:creator>SatyaPaleti</dc:creator>
      <dc:date>2019-05-10T13:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Load last 3 years Data from Sql Select</title>
      <link>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1578992#M739924</link>
      <description>&lt;P&gt;you can use the code below to load only last 3 years data from the table.&lt;/P&gt;&lt;P&gt;select * from table_name where field_year in (select distinct field_year from table_name order by 1 desc limit 3)&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 13:27:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1578992#M739924</guid>
      <dc:creator>jwang2016</dc:creator>
      <dc:date>2019-05-10T13:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Load last 3 years Data from Sql Select</title>
      <link>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1578994#M739925</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your responce. Year field is not available&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 13:31:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1578994#M739925</guid>
      <dc:creator>SatyaPaleti</dc:creator>
      <dc:date>2019-05-10T13:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Load last 3 years Data from Sql Select</title>
      <link>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1579026#M739926</link>
      <description>&lt;P&gt;get the year from the field that contains the year info.&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 14:28:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1579026#M739926</guid>
      <dc:creator>jwang2016</dc:creator>
      <dc:date>2019-05-10T14:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load last 3 years Data from Sql Select</title>
      <link>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1579084#M739927</link>
      <description>&lt;P&gt;Is CJD a date data type? you may need to convert it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mike&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 16:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-last-3-years-Data-from-Sql-Select/m-p/1579084#M739927</guid>
      <dc:creator>mikecrengland</dc:creator>
      <dc:date>2019-05-10T16:46:12Z</dc:date>
    </item>
  </channel>
</rss>

