<?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: Error in script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/error-in-script/m-p/3833671#M66550</link>
    <description>What error is it giving you? How do you know it is "not able to read the cursor"?&lt;BR /&gt;&lt;BR /&gt;Also, is that the actual contents of your script?</description>
    <pubDate>Mon, 31 Jul 2006 09:27:30 GMT</pubDate>
    <dc:creator>Jonathan Fife</dc:creator>
    <dc:date>2006-07-31T09:27:30Z</dc:date>
    <item>
      <title>Error in script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-in-script/m-p/3833670#M66549</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;I wrote unix shell program(bash) which in turn executes two sql statements&lt;BR /&gt;TaBLE STRUCTURE &lt;BR /&gt;Employee&lt;BR /&gt;criteriano project&lt;BR /&gt;ctr2 update table1 set empname='arun' where empid=1&lt;BR /&gt;&lt;BR /&gt;SCRIPT&lt;BR /&gt;#!bin/sh&lt;BR /&gt;/oraclepath username/password&amp;lt;&lt;EOF&gt;&lt;/EOF&gt;&lt;BR /&gt;update employee&lt;BR /&gt;set sal=sal+2000;&lt;BR /&gt;commit;&lt;BR /&gt;&lt;BR /&gt;DECLARE result employee.project%TYPE;&lt;BR /&gt;i NUMBER DEFAULT 0;&lt;BR /&gt;j NUMBER;&lt;BR /&gt;BEGIN&lt;BR /&gt;SELECT COUNT(*) INTO j FROM employee WHERE EXISTS(SELECT * FROM employeeWHERE CRITERIANO='Crt2');&lt;BR /&gt;IF(j&amp;gt;0) THEN&lt;BR /&gt;DECLARE CURSOR cursorname IS SELECT * FROM employee WHERE criteriano='Crt2';&lt;BR /&gt;BEGIN&lt;BR /&gt;FOR navcursor IN cursorname&lt;BR /&gt;LOOP&lt;BR /&gt;i:=i+1;&lt;BR /&gt;result:=navcursor.project;&lt;BR /&gt;EXECUTE IMMEDIATE result;&lt;BR /&gt;dbms_output.put_line('Look Ma, I can print from PL/SQL!!!');&lt;BR /&gt;&lt;BR /&gt;COMMIT;&lt;BR /&gt;END LOOP;&lt;BR /&gt;END;&lt;BR /&gt;ELSE&lt;BR /&gt;dbms_output.put_line('Look Ma, I can print from PL/SQL!!!');&lt;BR /&gt;&lt;BR /&gt;END IF;&lt;BR /&gt;END&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;Both query gets execute successfully in query analyser&lt;BR /&gt; But when used in unix script 1st query gets executed not the second(i.e) cursor.&lt;BR /&gt;Its not able to read the cursor &lt;BR /&gt;I need  both the query to be executed when i run the script&lt;BR /&gt;&lt;BR /&gt;How to solve this&lt;BR /&gt;Help me&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jul 2006 04:29:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-in-script/m-p/3833670#M66549</guid>
      <dc:creator>ancys</dc:creator>
      <dc:date>2006-07-31T04:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error in script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-in-script/m-p/3833671#M66550</link>
      <description>What error is it giving you? How do you know it is "not able to read the cursor"?&lt;BR /&gt;&lt;BR /&gt;Also, is that the actual contents of your script?</description>
      <pubDate>Mon, 31 Jul 2006 09:27:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-in-script/m-p/3833671#M66550</guid>
      <dc:creator>Jonathan Fife</dc:creator>
      <dc:date>2006-07-31T09:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error in script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-in-script/m-p/3833672#M66551</link>
      <description>hi&lt;BR /&gt;&lt;BR /&gt;Any sql statements(insert or update or delete or cursor concept) which is placed after the update statement is not getting executed.&lt;BR /&gt;&lt;BR /&gt;The concept is for given criteriano there can multiple project i  need to navigate  through the records for given criteria no&lt;BR /&gt;&lt;BR /&gt;Help Please!!!</description>
      <pubDate>Mon, 31 Jul 2006 23:08:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-in-script/m-p/3833672#M66551</guid>
      <dc:creator>ancys</dc:creator>
      <dc:date>2006-07-31T23:08:33Z</dc:date>
    </item>
  </channel>
</rss>

