- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- procedure in unix
Operating System - Linux
1752773
Members
5018
Online
108789
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2006 12:21 AM
08-11-2006 12:21 AM
procedure in unix
Hi all,
I have a table which has two columns
Criterian no CRT1
UPD_STATEMENT
update table_case set title=:' || CRITERIA_NUMBER || ', support_msg=:' || FILE_NAME || ' where objid=268435458;
update table_case set title=:' || CRITERIA_NUMBER || ', support_msg=:' || FILE_NAME || ' where objid=268435459;
For this CRT1 ther are two update statement so i want the procedure to execute two update stmnts
create or replace procedure proc2(CRITERIA_NUMBER varchar2,FILE_NAME varchar2 ) is
str varchar2(2000);
NOC number(7,2);
pos Number(7,2);
counter Number(7,2);
tempstr varchar2(1000);
cutchar varchar2(1000);
Begin
SELECT upd_statement INTO str FROM cfg_batchimporttool WHERE criteriano=CRITERIA_NUMBER;
tempstr:=str;
IF(LENGTH(str)>0)
THEN
dbms_output.put_line('Total Length ' ||LENGTH(str));
NOC:=LENGTH(str);
counter:=1;
WHILE(counter<=NOC)
LOOP
pos:=INSTR(tempstr,';');
if(pos=0)
THEN
EXIT;
END IF;
cutchar:=SUBSTR(tempstr,1,pos-1);
IF(LENGTH(tempstr)!=0)
THEN
BEGIN
dbms_output.put_line('ORIGINAL ::::'||cutchar);
EXECUTE IMMEDIATE cutchar using CRITERIA_NUMBER,FILE_NAME;
tempstr:=SUBSTR(tempstr,(pos+1),NOC);
END ;
ELSE
EXIT;
END IF;
counter:=(pos+1);
END LOOP;
END IF;
END proc2;
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
EXECUTE IMMEDIATE cutchar using CRITERIA_NUMBER,FILE_NAME in this line
A host/bind variable invalid
Wat change i need to make either in procedure r tin the update stmnt int the table
But this procedure is not executed i need to call procedure in unix
I have a table which has two columns
Criterian no CRT1
UPD_STATEMENT
update table_case set title=:' || CRITERIA_NUMBER || ', support_msg=:' || FILE_NAME || ' where objid=268435458;
update table_case set title=:' || CRITERIA_NUMBER || ', support_msg=:' || FILE_NAME || ' where objid=268435459;
For this CRT1 ther are two update statement so i want the procedure to execute two update stmnts
create or replace procedure proc2(CRITERIA_NUMBER varchar2,FILE_NAME varchar2 ) is
str varchar2(2000);
NOC number(7,2);
pos Number(7,2);
counter Number(7,2);
tempstr varchar2(1000);
cutchar varchar2(1000);
Begin
SELECT upd_statement INTO str FROM cfg_batchimporttool WHERE criteriano=CRITERIA_NUMBER;
tempstr:=str;
IF(LENGTH(str)>0)
THEN
dbms_output.put_line('Total Length ' ||LENGTH(str));
NOC:=LENGTH(str);
counter:=1;
WHILE(counter<=NOC)
LOOP
pos:=INSTR(tempstr,';');
if(pos=0)
THEN
EXIT;
END IF;
cutchar:=SUBSTR(tempstr,1,pos-1);
IF(LENGTH(tempstr)!=0)
THEN
BEGIN
dbms_output.put_line('ORIGINAL ::::'||cutchar);
EXECUTE IMMEDIATE cutchar using CRITERIA_NUMBER,FILE_NAME;
tempstr:=SUBSTR(tempstr,(pos+1),NOC);
END ;
ELSE
EXIT;
END IF;
counter:=(pos+1);
END LOOP;
END IF;
END proc2;
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
EXECUTE IMMEDIATE cutchar using CRITERIA_NUMBER,FILE_NAME in this line
A host/bind variable invalid
Wat change i need to make either in procedure r tin the update stmnt int the table
But this procedure is not executed i need to call procedure in unix
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2006 03:20 PM
08-12-2006 03:20 PM
Re: procedure in unix
What SQL server are you using here? I can't tell.
One long-haired git at your service...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP