<?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 SQL function adopt it into qlikview. Need help! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-function-adopt-it-into-qlikview-Need-help/m-p/285896#M578267</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an Oracle function that returns if a policy has been changed or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I addopt this function to qlikview?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;each information helps me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION IS_ANNEX_CHANGED (p_policy_id number) return varchar is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cursor c1 is select count(*)&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;select cfg.fract_type&lt;/P&gt;&lt;P&gt;from gen_risk_covered grc, cfg_gl_gen_fractions cfg&lt;/P&gt;&lt;P&gt;where grc.cover_type=cfg.cover_type&lt;/P&gt;&lt;P&gt;and grc.insr_type=cfg.insr_type&lt;/P&gt;&lt;P&gt;and risk_state between 0 and 12&lt;/P&gt;&lt;P&gt;and grc.annex_id&amp;lt;&amp;gt;0&lt;/P&gt;&lt;P&gt;and policy_id=p_policy_id&lt;/P&gt;&lt;P&gt;minus&lt;/P&gt;&lt;P&gt;select cfg.fract_type&lt;/P&gt;&lt;P&gt;from gen_risk_covered grc, cfg_gl_gen_fractions cfg&lt;/P&gt;&lt;P&gt;where grc.cover_type=cfg.cover_type&lt;/P&gt;&lt;P&gt;and grc.insr_type=cfg.insr_type&lt;/P&gt;&lt;P&gt;--and risk_state between 0 and 12&lt;/P&gt;&lt;P&gt;and grc.annex_id=0&lt;/P&gt;&lt;P&gt;and policy_id=p_policy_id&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nr number;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open c1;&lt;/P&gt;&lt;P&gt;fetch c1 into nr;&lt;/P&gt;&lt;P&gt;close c1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if nvl(nr,0)&amp;gt;0 then &lt;/P&gt;&lt;P&gt;return 'Y';&lt;/P&gt;&lt;P&gt;else return 'N';&lt;/P&gt;&lt;P&gt;end if;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2012 15:44:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-02-15T15:44:23Z</dc:date>
    <item>
      <title>SQL function adopt it into qlikview. Need help!</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-function-adopt-it-into-qlikview-Need-help/m-p/285896#M578267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an Oracle function that returns if a policy has been changed or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I addopt this function to qlikview?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;each information helps me...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION IS_ANNEX_CHANGED (p_policy_id number) return varchar is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cursor c1 is select count(*)&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;select cfg.fract_type&lt;/P&gt;&lt;P&gt;from gen_risk_covered grc, cfg_gl_gen_fractions cfg&lt;/P&gt;&lt;P&gt;where grc.cover_type=cfg.cover_type&lt;/P&gt;&lt;P&gt;and grc.insr_type=cfg.insr_type&lt;/P&gt;&lt;P&gt;and risk_state between 0 and 12&lt;/P&gt;&lt;P&gt;and grc.annex_id&amp;lt;&amp;gt;0&lt;/P&gt;&lt;P&gt;and policy_id=p_policy_id&lt;/P&gt;&lt;P&gt;minus&lt;/P&gt;&lt;P&gt;select cfg.fract_type&lt;/P&gt;&lt;P&gt;from gen_risk_covered grc, cfg_gl_gen_fractions cfg&lt;/P&gt;&lt;P&gt;where grc.cover_type=cfg.cover_type&lt;/P&gt;&lt;P&gt;and grc.insr_type=cfg.insr_type&lt;/P&gt;&lt;P&gt;--and risk_state between 0 and 12&lt;/P&gt;&lt;P&gt;and grc.annex_id=0&lt;/P&gt;&lt;P&gt;and policy_id=p_policy_id&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nr number;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open c1;&lt;/P&gt;&lt;P&gt;fetch c1 into nr;&lt;/P&gt;&lt;P&gt;close c1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if nvl(nr,0)&amp;gt;0 then &lt;/P&gt;&lt;P&gt;return 'Y';&lt;/P&gt;&lt;P&gt;else return 'N';&lt;/P&gt;&lt;P&gt;end if;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 15:44:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-function-adopt-it-into-qlikview-Need-help/m-p/285896#M578267</guid>
      <dc:creator />
      <dc:date>2012-02-15T15:44:23Z</dc:date>
    </item>
    <item>
      <title>SQL function adopt it into qlikview. Need help!</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-function-adopt-it-into-qlikview-Need-help/m-p/285897#M578268</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 would want to be able to identify a primary key - e.g. a Policy number.&amp;nbsp; Then I could write something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pol1:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; policy_id as PolicyID;&lt;/P&gt;&lt;P&gt;SQL select policy_id&lt;/P&gt;&lt;P&gt;from gen_risk_covered grc, cfg_gl_gen_fractions cfg&lt;/P&gt;&lt;P&gt;where grc.cover_type=cfg.cover_type&lt;/P&gt;&lt;P&gt;and grc.insr_type=cfg.insr_type&lt;/P&gt;&lt;P&gt;and risk_state between 0 and 12&lt;/P&gt;&lt;P&gt;and grc.annex_id&amp;lt;&amp;gt;0&lt;/P&gt;&lt;P&gt;and policy_id=p_policy_id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pol2:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; policy_id as PolicyID2&lt;/P&gt;&lt;P&gt;Where Exists (PoilicyID1, policy_id);&lt;/P&gt;&lt;P&gt;SQL select policy_id&lt;/P&gt;&lt;P&gt;from gen_risk_covered grc, cfg_gl_gen_fractions cfg&lt;/P&gt;&lt;P&gt;where grc.cover_type=cfg.cover_type&lt;/P&gt;&lt;P&gt;and grc.insr_type=cfg.insr_type&lt;/P&gt;&lt;P&gt;and grc.annex_id=0&lt;/P&gt;&lt;P&gt;and policy_id=p_policy_id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, if you have anything in the PolicyID2 field (use FieldValueCount), you know the policy number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or something like that &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&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;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2012 16:26:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-function-adopt-it-into-qlikview-Need-help/m-p/285897#M578268</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2012-02-15T16:26:41Z</dc:date>
    </item>
  </channel>
</rss>

