<?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 AW:Sql error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sql-error/m-p/166638#M38518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;is this statement working on Oracle?&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Nov 2009 20:45:56 GMT</pubDate>
    <dc:creator>rbecher</dc:creator>
    <dc:date>2009-11-26T20:45:56Z</dc:date>
    <item>
      <title>Sql error</title>
      <link>https://community.qlik.com/t5/QlikView/Sql-error/m-p/166637#M38517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;missing parenthiss error any ideas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sql select&lt;BR /&gt; fac1, moa1, age_group1,&lt;BR /&gt; to_char((moapres/moatot) * 100,'900.00') || '%' moa,&lt;BR /&gt; to_char((facpres/factot) * 100,'900.00') || '%' fac,&lt;BR /&gt; to_char((agepres/agetot) * 100,'900.00') || '%' age,&lt;BR /&gt; to_char((fac_agepres/fac_agetot) * 100,'900.00') || '%' fac_age,&lt;BR /&gt; to_char((moa_facpres/moa_factot) * 100,'900.00') || '%' moa_fac,&lt;BR /&gt; to_char((moa_agepres/moa_agetot) * 100,'900.00') || '%' moa_age,&lt;BR /&gt; to_char((moa_fac_agepres/moa_fac_agetot) * 100,'900.00') || '%' moa_fac_age,&lt;BR /&gt; to_char((totpres/tottot) * 100,'900.00') || '%' tot&lt;BR /&gt;from (&lt;BR /&gt; select distinct&lt;BR /&gt; faculty fac1,moa moa1,age_group age_group1,&lt;BR /&gt; sum(sumoftotal) over(partition by moa) moatot,&lt;BR /&gt; sum(sumoftotal) over(partition by faculty) factot,&lt;BR /&gt; sum(sumoftotal) over(partition by age_group) agetot,&lt;BR /&gt; sum(sumoftotal) over(partition by faculty, age_group) fac_agetot,&lt;BR /&gt; sum(sumoftotal) over(partition by moa, faculty) moa_factot,&lt;BR /&gt; sum(sumoftotal) over(partition by moa, age_group) moa_agetot,&lt;BR /&gt; sum(sumoftotal) over(partition by moa, faculty, age_group) moa_fac_agetot,&lt;BR /&gt; sum(sumoftpres) over(partition by moa) moapres,&lt;BR /&gt; sum(sumoftpres) over(partition by faculty) facpres,&lt;BR /&gt; sum(sumoftpres) over(partition by age_group) agepres,&lt;BR /&gt; sum(sumoftpres) over(partition by faculty, age_group) fac_agepres,&lt;BR /&gt; sum(sumoftpres) over(partition by moa, faculty) moa_facpres,&lt;BR /&gt; sum(sumoftpres) over(partition by moa, age_group) moa_agepres,&lt;BR /&gt; sum(sumoftpres) over(partition by moa, faculty, age_group) moa_fac_agepres,&lt;BR /&gt; sum(sumoftpres) over() totpres,&lt;BR /&gt; sum(sumoftotal) over() tottot&lt;BR /&gt; from (&lt;BR /&gt; SELECT nvl(depts.faculty,uio.offering_organisation) faculty, CASE WHEN uio.FES_MOA_CODE !='01' THEN 'PT' ELSE 'FT' END moa,&lt;BR /&gt; Sum(src.total) SumOfTOTAL, Sum(src.tpres) SumOfTPRES, src.age_group&lt;BR /&gt; FROM&lt;BR /&gt; (SELECT Sum(rss.tpres) tpres, Sum(rss.total) total,&lt;BR /&gt; annual_constants.age_group(2,annual_constants.age_cy(p.date_of_birth)) age_group,&lt;BR /&gt; rss.sbj_code_p, rss.cal_occ_p cal_occ_p&lt;BR /&gt; FROM&lt;BR /&gt; reg_stu_stats rss&lt;BR /&gt; join people p ON rss.person_code = p.person_code&lt;BR /&gt; WHERE&lt;BR /&gt; rss.cal_occ_p LIKE '09%'&lt;BR /&gt; GROUP BY annual_constants.age_group(2,annual_constants.age_cy(p.date_of_birth)),&lt;BR /&gt; rss.sbj_code_p, rss.cal_occ_p&lt;BR /&gt; having sum(rss.total) != 0 -- 04/11/09 PC - removed sum(rss.tpres) != 0&lt;BR /&gt; ) src&lt;BR /&gt; join unit_instance_occurrences uio ON uio.fes_uins_instance_code = sbj_code_p&lt;BR /&gt; AND uio.calocc_occurrence_code = cal_occ_p&lt;BR /&gt; join unit_instances ui ON uio.fes_uins_instance_code = ui.fes_unit_instance_code&lt;BR /&gt; left join (&lt;BR /&gt; select primary_organisation,&lt;BR /&gt; secondary_organisation,&lt;BR /&gt; ou1.fes_full_name FACULTY,&lt;BR /&gt; ou2.fes_full_name DEPT&lt;BR /&gt; from org_unit_links&lt;BR /&gt; join organisation_units ou1 on ou1.organisation_code = primary_organisation&lt;BR /&gt; join organisation_units ou2 on ou2.organisation_code = secondary_organisation&lt;BR /&gt; where ou1.ORGANISATION_TYPE = 'F'&lt;BR /&gt; ) depts on uio.OFFERING_ORGANISATION = depts.secondary_organisation&lt;BR /&gt; GROUP BY nvl(depts.FACULTY,uio.offering_organisation), CASE WHEN uio.FES_MOA_CODE !='01' THEN 'PT' ELSE 'FT' END, src.age_group&lt;BR /&gt; )&lt;BR /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 19:34:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sql-error/m-p/166637#M38517</guid>
      <dc:creator />
      <dc:date>2009-11-26T19:34:05Z</dc:date>
    </item>
    <item>
      <title>AW:Sql error</title>
      <link>https://community.qlik.com/t5/QlikView/Sql-error/m-p/166638#M38518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthew,&lt;/P&gt;&lt;P&gt;is this statement working on Oracle?&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 20:45:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sql-error/m-p/166638#M38518</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-11-26T20:45:56Z</dc:date>
    </item>
    <item>
      <title>AW:Sql error</title>
      <link>https://community.qlik.com/t5/QlikView/Sql-error/m-p/166639#M38519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This inline comment could be a problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;-- 04/11/09 PC - removed sum(rss.tpres) != 0 -- 04/11/09 PC - removed sum(rss.tpres) != 0&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 20:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sql-error/m-p/166639#M38519</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-11-26T20:49:53Z</dc:date>
    </item>
  </channel>
</rss>

