<?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 Urgent: Selecting count from oracle sql into Qlikview Script Editor Variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Urgent-Selecting-count-from-oracle-sql-into-Qlikview-Script/m-p/288842#M1183056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am new to Qlikview so would require your help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my current requirements, I need to insert a username value into oracle table through a procedure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the user already exists in the table then I should not run the procedure otherwise I should execute the procedure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The procedure only inserts the record into table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this i am implementing by taking the count into a variable cnt and then checking the same..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but during debugging cnt value is showing as &amp;lt;NULL&amp;gt; so i am unable to process the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am connecting to an Oracle database using ODBC connector and then check whether the user already exist in the table&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need urgent support from you guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the script is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO [dbname;DBQ=dbname] (XUserId is user, XPassword is pass, mode IS write);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;set user_id='USER1';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table1:&lt;BR /&gt;load *;&lt;BR /&gt;select count(1) cnt from ushypadm.eradb_dim_sec_v where upper(usr_id) = upper('$(user_id)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set c1=$(cnt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if c1=0 then&lt;BR /&gt;SQL CALL schema_name.proc_name('$(user_id)');&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Dec 2011 19:12:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-12-08T19:12:24Z</dc:date>
    <item>
      <title>Urgent: Selecting count from oracle sql into Qlikview Script Editor Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Urgent-Selecting-count-from-oracle-sql-into-Qlikview-Script/m-p/288842#M1183056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am new to Qlikview so would require your help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my current requirements, I need to insert a username value into oracle table through a procedure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the user already exists in the table then I should not run the procedure otherwise I should execute the procedure...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The procedure only inserts the record into table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this i am implementing by taking the count into a variable cnt and then checking the same..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but during debugging cnt value is showing as &amp;lt;NULL&amp;gt; so i am unable to process the same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am connecting to an Oracle database using ODBC connector and then check whether the user already exist in the table&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need urgent support from you guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the script is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO [dbname;DBQ=dbname] (XUserId is user, XPassword is pass, mode IS write);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;set user_id='USER1';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table1:&lt;BR /&gt;load *;&lt;BR /&gt;select count(1) cnt from ushypadm.eradb_dim_sec_v where upper(usr_id) = upper('$(user_id)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set c1=$(cnt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if c1=0 then&lt;BR /&gt;SQL CALL schema_name.proc_name('$(user_id)');&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2011 19:12:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Urgent-Selecting-count-from-oracle-sql-into-Qlikview-Script/m-p/288842#M1183056</guid>
      <dc:creator />
      <dc:date>2011-12-08T19:12:24Z</dc:date>
    </item>
    <item>
      <title>Urgent: Selecting count from oracle sql into Qlikview Script Editor Variable</title>
      <link>https://community.qlik.com/t5/QlikView/Urgent-Selecting-count-from-oracle-sql-into-Qlikview-Script/m-p/288843#M1183057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I went through certail forums and found peek function but still it is not returning any values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set user_id='USER1';&lt;/P&gt;&lt;P&gt;data_tab:&lt;BR /&gt;LOAD *;&lt;BR /&gt;sql select count(1) cnt from schema.table where upper(usr_id) = upper('$(user_id)');&lt;/P&gt;&lt;P&gt;let vCnt=Peek('maxusr',0,data_tab);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I debug it is showing vCnt=&amp;lt;NULL&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Dec 2011 20:04:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Urgent-Selecting-count-from-oracle-sql-into-Qlikview-Script/m-p/288843#M1183057</guid>
      <dc:creator />
      <dc:date>2011-12-08T20:04:59Z</dc:date>
    </item>
  </channel>
</rss>

