troubleshooting Question

syntax of stored procedure

Avatar of RK107
RK107 asked on
Oracle Database
24 Comments1 Solution579 ViewsLast Modified:
Could someone please help me with the syntax of stored procedure in Oracle 9i. I am new to writng a stored procedure. I think this logic would solve my problem I actually posted in vb.net.
create or replace procedure usp_GetMap is
begin
 
  DECLARE variable v_link;
     variable vxmltype;
     var modelpath;
     var apppath;
 
 
    Cursor C1 IS
    SELECT DISTINCT LINK from MAP;
    Cursor C2 IS
    Select XMLTYPE, NODENAME from MAP where LINK = v_link;
 
 
  For Open Cursor C1
   
         v_link = C1.LINK;
         modelpath = "";
         apppath = "";
    FOR Open Cusror C2;
     
      if C1.XMLTYPE = 'MODEL' then
          modelpath = modelpath || '/' || C1.nodename;
      end if;
      if C1.XMLTYPE = 'APP' then
          apppath = apppath || '/' || C1.nodename;
      end if;

  End Loop;
     INSERT INTO TEMPTABLE (v_link, modelpath, apppath);
   
End Loop;
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 24 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 24 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros