<?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: Recode YearMonth &amp; YearQtr return error msg in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920738#M653174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mass &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply , i am not quite clear what you try to said . can you share with me again why ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year(date_time) as year, &lt;/P&gt;&lt;P&gt;month(date_time) as month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above 2 line of script with out give me error ? which the above 2 line of script after SQL script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jul 2015 16:08:46 GMT</pubDate>
    <dc:creator>paulyeo11</dc:creator>
    <dc:date>2015-07-29T16:08:46Z</dc:date>
    <item>
      <title>Recode YearMonth &amp; YearQtr return error msg</title>
      <link>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920736#M653172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below 2 line of script , when i run while i read data from SQL , i will get error :-&lt;/P&gt;&lt;P&gt;//date(Month(date_time),'YY MMM') as YearMonth,&lt;/P&gt;&lt;P&gt;//Right(year(date_time),2) &amp;amp; '-Q' &amp;amp; ceil(Month(date_time)/3) as YearQtr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May i know how to edit the above script , so that no error will occur ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enclosed my QVW file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 15:47:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920736#M653172</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2015-07-29T15:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Recode YearMonth &amp; YearQtr return error msg</title>
      <link>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920737#M653173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after SQL you must use the syntax of your database (I think sql server, in bold)&lt;/P&gt;&lt;P&gt;before SQL (after load) the QlikView syntax&lt;/P&gt;&lt;P&gt;you cannot use Qlik function in SQL section&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // here Qlik syntax&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // here sql server syntax&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 16:00:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920737#M653173</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-07-29T16:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Recode YearMonth &amp; YearQtr return error msg</title>
      <link>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920738#M653174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mass &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply , i am not quite clear what you try to said . can you share with me again why ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year(date_time) as year, &lt;/P&gt;&lt;P&gt;month(date_time) as month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above 2 line of script with out give me error ? which the above 2 line of script after SQL script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 16:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920738#M653174</guid>
      <dc:creator>paulyeo11</dc:creator>
      <dc:date>2015-07-29T16:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Recode YearMonth &amp; YearQtr return error msg</title>
      <link>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920739#M653175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think these lines are ok in sql server (I assumed is your db)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year(dat_data),&lt;/P&gt;&lt;P&gt;month(dat_data)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but these lines aren't ok&amp;nbsp; (and you asked for these lines in your first post) in the SQL section&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date(Month(date_time),'YY MMM') as YearMonth,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Right(year(date_time),2) &amp;amp; '-Q' &amp;amp; ceil(Month(date_time)/3) as YearQtr,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if you want yearmonth and yearqtr try this&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(monthstart(date_time),'YY MMM') as YearMonth,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Right(year(date_time),2) &amp;amp; '-Q' &amp;amp; ceil(Month(date_time)/3) as YearQtr;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;line_id as line_id,&lt;/P&gt;&lt;P&gt;product_id as product_id,&lt;/P&gt;&lt;P&gt;kode_reject as kode_reject,&lt;/P&gt;&lt;P&gt;operator_id as operator_id,&lt;/P&gt;&lt;P&gt;shift_id as shift_id,&lt;/P&gt;&lt;P&gt;dies_id as dies_id,&lt;/P&gt;&lt;P&gt;date_time as date_time,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year(date_time) as year,&lt;/P&gt;&lt;P&gt;//date(Month(date_time),'YY MMM') as YearMonth,&lt;/P&gt;&lt;P&gt;//Right(year(date_time),2) &amp;amp; '-Q' &amp;amp; ceil(Month(date_time)/3) as YearQtr,&lt;/P&gt;&lt;P&gt;//num(month(date_time)) as month&lt;/P&gt;&lt;P&gt;month(date_time) as month&lt;/P&gt;&lt;P&gt;//Date(Monthstart([date_time]), 'YY MMM') as YearMonth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM andonDatabas.dbo."record_reject_detail_plc";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 16:24:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920739#M653175</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-07-29T16:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Recode YearMonth &amp; YearQtr return error msg</title>
      <link>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920740#M653176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;I think This Statements can help you out. Try Once&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(date_time,'YY MMM') as YearMonth,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Right(year(date_time),2) &amp;amp; '- Q' &amp;amp; Ceil(Month(date_time)/3) as YearQtr;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 18:13:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Recode-YearMonth-YearQtr-return-error-msg/m-p/920740#M653176</guid>
      <dc:creator />
      <dc:date>2015-07-29T18:13:30Z</dc:date>
    </item>
  </channel>
</rss>

