<?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: procedure in unix in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/procedure-in-unix/m-p/3841833#M66636</link>
    <description>What SQL server are you using here?  I can't tell.</description>
    <pubDate>Sat, 12 Aug 2006 22:20:56 GMT</pubDate>
    <dc:creator>Stuart Browne</dc:creator>
    <dc:date>2006-08-12T22:20:56Z</dc:date>
    <item>
      <title>procedure in unix</title>
      <link>https://community.hpe.com/t5/operating-system-linux/procedure-in-unix/m-p/3841832#M66635</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I have a table which has two columns&lt;BR /&gt;&lt;BR /&gt;Criterian no CRT1&lt;BR /&gt;&lt;BR /&gt;UPD_STATEMENT&lt;BR /&gt;&lt;BR /&gt;update table_case set title=:' || CRITERIA_NUMBER || ', support_msg=:' || FILE_NAME || ' where objid=268435458;&lt;BR /&gt;update table_case set title=:' || CRITERIA_NUMBER || ', support_msg=:' || FILE_NAME || ' where objid=268435459;&lt;BR /&gt;&lt;BR /&gt;For this CRT1 ther are two update statement so i want the procedure to execute two update stmnts&lt;BR /&gt;&lt;BR /&gt;create or replace procedure proc2(CRITERIA_NUMBER varchar2,FILE_NAME varchar2 ) is&lt;BR /&gt;str varchar2(2000);&lt;BR /&gt;NOC number(7,2);&lt;BR /&gt;pos Number(7,2);&lt;BR /&gt;counter Number(7,2);&lt;BR /&gt;tempstr varchar2(1000);&lt;BR /&gt;cutchar varchar2(1000);&lt;BR /&gt;&lt;BR /&gt;Begin&lt;BR /&gt;&lt;BR /&gt;SELECT upd_statement INTO str FROM cfg_batchimporttool WHERE criteriano=CRITERIA_NUMBER;&lt;BR /&gt;&lt;BR /&gt;tempstr:=str;&lt;BR /&gt;IF(LENGTH(str)&amp;gt;0)&lt;BR /&gt;THEN&lt;BR /&gt;dbms_output.put_line('Total Length ' ||LENGTH(str));&lt;BR /&gt;NOC:=LENGTH(str);&lt;BR /&gt;counter:=1;&lt;BR /&gt;WHILE(counter&amp;lt;=NOC)&lt;BR /&gt;LOOP&lt;BR /&gt;pos:=INSTR(tempstr,';');&lt;BR /&gt;if(pos=0)&lt;BR /&gt;THEN&lt;BR /&gt;EXIT;&lt;BR /&gt;END IF;&lt;BR /&gt;cutchar:=SUBSTR(tempstr,1,pos-1);&lt;BR /&gt;IF(LENGTH(tempstr)!=0)&lt;BR /&gt;THEN&lt;BR /&gt;BEGIN&lt;BR /&gt;dbms_output.put_line('ORIGINAL ::::'||cutchar);&lt;BR /&gt;EXECUTE IMMEDIATE cutchar using CRITERIA_NUMBER,FILE_NAME;&lt;BR /&gt;tempstr:=SUBSTR(tempstr,(pos+1),NOC);&lt;BR /&gt;END ;&lt;BR /&gt;ELSE&lt;BR /&gt;EXIT;&lt;BR /&gt;END IF;&lt;BR /&gt;counter:=(pos+1);&lt;BR /&gt;&lt;BR /&gt;END LOOP;&lt;BR /&gt;&lt;BR /&gt;END IF;&lt;BR /&gt;END proc2;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This procedure works fine when i hard code the values for ilename and criteriano directly in update stmnt.But when use variable and try to assign procedure param to these variables using execute immediate it shows an error&lt;BR /&gt;&lt;BR /&gt;EXECUTE IMMEDIATE cutchar using CRITERIA_NUMBER,FILE_NAME in this line&lt;BR /&gt;A host/bind variable invalid&lt;BR /&gt;&lt;BR /&gt;Wat change i need to make either in procedure r tin the update stmnt int the table&lt;BR /&gt;But this procedure is not executed i need to call procedure in unix</description>
      <pubDate>Fri, 11 Aug 2006 07:21:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/procedure-in-unix/m-p/3841832#M66635</guid>
      <dc:creator>ancys</dc:creator>
      <dc:date>2006-08-11T07:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: procedure in unix</title>
      <link>https://community.hpe.com/t5/operating-system-linux/procedure-in-unix/m-p/3841833#M66636</link>
      <description>What SQL server are you using here?  I can't tell.</description>
      <pubDate>Sat, 12 Aug 2006 22:20:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/procedure-in-unix/m-p/3841833#M66636</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-08-12T22:20:56Z</dc:date>
    </item>
  </channel>
</rss>

