Procedure confusion again....

The exerice is this:
Write a procedure that will transfer all employees to the same dept (your choice) and each of the employees supevisor's emp no to the supervisor number for the department you choose. For example if you chose the Accounting department and the Accounting department's
supervisor number is 1234 then you change all employees to the Accounting department and their respective supervisor to 1234.
Don't even know where to start with this one.
Dee

Don't even know where to start with this one....which, I'm afraid, illustrates the pointlessness of these exams. Even if you pass, you will just have a piece of paper. You won't be a good programmer.
I suggest you read the documentation and try to understand PL/SQL. Then tackle the exams.
The documentation is on line. Good places to start are:
the PL/SQL User's Guide http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/toc.htm
and
Application Developer's Guide - Fundamentals http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96590/toc.htm
You should also check out the SQL reference http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm , as that has lots of examples of SELECT and DML statements.
Good luck, APC

Similar Messages

  • Procedural confusion (several questions)

    My task is to develop a Course Management System:
    I have the desired variables for an abstract Course class which will be extended by 3 subclasses of CourseType
    Side: this task is due in 6 days and the how and why are becoming blurred
    At this time I don't have working code (when I run it I get no result) so I'm back to starting over
    Q1 I want my subclasses to inherit my super variables but I understand that if I define 'private' variables they are not inherited .... which is 'proper coding'?
    Declare the variables as public (available anywhere) or declare protected (there is no need for them to be accessed from outside the project).
    appropriate security levels are one of the criteria of the task (and I've confused myself)
    Q2 Methods will be inherited by subclasses, with mutator methods which provide subclass specific data being overwritten accordingly. Would I be correct in assuming the 'How' for this section will depend on my chosen option above?
    Q3 In java 1.6; which is the preferred variable Array method .... Vector() or ArrayList() ?

    Thanks Keith
    This assignment is actually part 2, I missed the first part because my motherboard died (and the tutor hasn't posted the solution yet)
    so I'm sort of working blind
    Part 3 is to create the GUI App, so I'm trying to code with that in mind
    in part 1, it was suggested that we use a Courses interface which would be implemented by the Course class (which is in turn, extended by CourseType classes; I don't understand interfaces so I've opted for an abstract Course class because I can't define methods in an instance.
    I have the abstract Course class, a Student class, and I've tried to put together a working Course.CookingCourse subclass
    package <packageName>;
    import java.util.*;
    public abstract class Course
        private int ID = 0;
        private String courseTitle;
        private String teacher;
        private int MAX_STUDENTS;
        private ArrayList listStudents = new ArrayList();
        private int totalStudents = listStudents.size();
        private double standardCharge;
        private double income;
        private double runCost;
         * A Scanner instance, for reading data inputs from the keyboard
        private static Scanner console = new Scanner(System.in);
        private String inputLine = console.nextLine();
        private String inputString = console.next();
        public int getID()
            return ID;
        public int newID()
            getID();
            ID = ID + 1;
            return ID;
        public String setCourseTitle()
            System.out.println("What is the Title of this Course?");
            courseTitle = inputLine;
            return courseTitle;
        public String getCourseTitle()
            return courseTitle;
        public String getTeacher()
            return teacher;
        public String assignTeacher()
            /** check if we have assigned a teacher yet */
            if (getTeacher().length() < 1)
                /** If there is no teacher, assign one */
                System.out.println("Who will teach this Course?");
                while (console.hasNext())
                    String firstName = inputString;
                    String lastName = inputString;
                    teacher = firstName + " " + lastName;
            } else
                /** there is a teacher assigned */
            return teacher;
        public int setMAX_STUDENTS(int val)
            this.MAX_STUDENTS = val;
            return MAX_STUDENTS;
        public int getMAX_STUDENTS()
            return MAX_STUDENTS;
        public int getTotalStudents()
            return totalStudents;
        public double setStandardCharge(double charge) {
            this.standardCharge = charge;
            return standardCharge;
       public double getStandardCharge()
            return standardCharge;
        public double getIncome()
            return income;
        public double getRunCost()
            return runCost;
         * Calculates the running cost for the course, based on the formula
         * provided. The formula is entered per instance.
         * @return runCost
        public abstract double calculateRunCost();
    }Do I need to define a constructor for an abstract class?
    package <packageName>;
    import java.util.*;
    public class CookingCourse extends Course
        int ID = super.getID();
        String courseTitle = super.setCourseTitle();
        String teacher = super.assignTeacher();
        final static int MAX_STUDENTS = super.setMAX_STUDENTS(10);
        ArrayList listStudents;   
        int totalStudents = super.setTotalStudents();
        double standardCharge;
        double income;
        double runCost;
        /** Default constructor */
        public CookingCourse()
            this.ID = super.newID();
            this.courseTitle = super.setCourseTitle();
            this.teacher = super.assignTeacher();
            this.MAX_STUDENTS = super.setMAX_STUDENTS(10);
            this.listStudents = new ArrayList();
            this.totalStudents = listStudents.size();
            this.standardCharge = setStandardCharge();
            this.income = 0.0;
            this.runCost = calculateRunCost();
         * Custom constructor with declared variable
         * @param courseTitle
        public CookingCourse(String courseTitle) {
            this.ID = super.newID();
            this.courseTitle = courseTitle;
            this.teacher = super.assignTeacher();
            this.MAX_STUDENTS = super.setMAX_STUDENTS(10);
            this.listStudents = new ArrayList();
            this.totalStudents = listStudents.size();
            this.standardCharge = setStandardCharge();
            this.income = 0.0;
            this.runCost = calculateRunCost();
         * Stores the standard charge for the course
         * @return standardCharge
        public double setStandardCharge() {
            double charge;
            if(courseTitle == "Italian Cooking"){
                 charge = 500.0;
            } else { // courseTitle == "Seafood"
                charge = 700.0;
            this.standardCharge = charge;
            return standardCharge;
         * Calculates the cost of running the course according to the
         * formula provided
         * @return runCost
        @Override
        public double calculateRunCost()
            double formulaBase = 1000.0;
            double formulaVarient = totalStudents * 50.0;
            runCost = formulaBase + formulaVarient;
            return runCost;
    }And, the Student class
    package <packageName>;
    import java.util.Scanner;
    public class Student
        private String name;
        boolean fifty = false;
        boolean returning = false;
        private String address;
        private int age;
        private double courseFees = 0.0;
         * create a Scanner for reading data inputs from the keyboard
        private static Scanner console = new Scanner(System.in);
        private String inputLine = console.nextLine();
        private int inputInt = console.nextInt();
         * Student Constructor
         * Since each name will be unique, we create the student instance
         * by directly entering this information
         * @param name
        Student(String name)
            this.name = name;
            this.fifty = false;
            this.returning = false;
            this.address = setStudentAddress();
            this.age = setAge();
            this.courseFees = 0.0;
        public String setStudentAddress()
            System.out.println("Enter the Student's address: ");
            System.out.println("Hit <Enter> if not supplied");
            if (inputLine.length() == 0)
                address = "Address Unknown";
            } else
                address = inputLine;
            return address;
         * Calculates the Student's age by obtaining their Date of Birth and
         * comparing it to today's date.
         * By utilising this method, we can dynamically calculate the age of
         * returning students.
         * @return age
        public int setAge()
            // Get today's date, so we can calculate age
            long today = new java.util.GregorianCalendar().getTime().getTime();
            System.out.println("Enter the Student's Date of Birth: (dd mm yyyy)");
            int day = inputInt;
            int month = (inputInt - 1);
            int year = inputInt;
            long birthDate = new java.util.GregorianCalendar(year, month, day)
                    .getTime().getTime();
            long diff = today - birthDate;
            // Convert milliseconds back to years
            long y_diff = diff / 1000 / 60 / 60 / 24 / 365;
            age = (int) y_diff;
            if (age > 49)
                fifty = true;
            return age;
        public double setCourseFees()
            // TODO
            return courseFees;
        public String getStudentName()
            return name;
        public String getStudentAddress()
            return address;
        public int getAge()
            return age;
        public double getCourseFees()
            return courseFees;
         * Add a new student
        public void addStudent()
            new Student(name);
    }I have yet to create the StudentRegister class, which will be our expanding array list of all students registered regardless of enrolment status.
    The ArrayLists within each Course will only contain students for that course (but I'm still unclear on the 'How' .... will consult textbook for that though)
    Edited by: kcstingel on 21/04/2008 22:05

  • Import procedure confusing, frustrating

    I have a folder with some wave files (created from recording in the basement), and I want to import them into ITunes as MP3s with my own artist name, album name, etc.
    The only way I can seem to do this is to double click one at a time, pause it, then right click to Get Info on the song, edit the info. Then it appears in the library, under the proper artist and album. FInally I right click the song and say Convert to MP3. Finally, I Clear the WAVE version.
    I have to do this process SEPARATELY for every song. I have spent hours trying to figure out how to manage my music files on this software and it is very frustrating, to say the least. I can select and drag all the songs into the Library, but then I cannot find them.
    I have "Make Copies in ITunes" and "Organize My Library" both checked. I have ITUNES 5 on a Windows machine.
    Any help is appreciated.

    Hi Maruthi,
    Correct imports process is as follows
    1) PO with valid customs conditions
    2) Miro for custom duties in INR.
    3) Capture excise(Bill of entry) with ref to PO, automatcially the popup screen for custom duty paid will appear.
    4) Do Migo with pop up for excise invoice and part 1 gets posted after saving.
    5) In J1iex, post the Part II for cenvat.
    Other than this if u try other methods, it will result in wrong updation.
    Please follow the standard process.

  • Patch confusion again

    Hi hussein,
    I have two (2) instances of EBS 11i named DEV and DEV2. Installed them both separately using rapidwiz.
    Scenaro 1:
    a) I applied patchA to DEV.
    b) I copied the data only (proddata) to DEV2, and run rapdiclone so that the DEV2 instance have the DEV1 database. I mean their database contents are identical, but the appstiers are not because patchA was not applied to DEV2 apps tier side.
    My question is can I apply patchA to DEV2 instance just to update the appstier side or the forms executables?
    thanks a lot

    Hi xyes;
    I have two (2) instances of EBS 11i named DEV and DEV2. Installed them both separately using rapidwiz.Those ebs has same patch level?
    Scenaro 1:
    a) I applied patchA to DEV.
    b) I copied the data only (proddata) to DEV2, and run rapdiclone so that the DEV2 instance have the DEV1 database. I mean their database contents are identical, but the appstiers are not because patchA was not applied to DEV2 apps tier side.You mean you run preclone on DEV on dbtier than copy from DEV to DEV2, then post clone db succeded and db is up, so yes we can say DEV db=DEV2 db,but what happen DEV2 original DB?
    Regard
    Helios

  • Im confused again

    What on earth is the third button down for one of the small ones third down. I don't understand x

    If you go into settings you can set the button to automatically open the camera when pressed to take photos quickly, if when in the camera application you press the two arrows at bottom right hand side it will open other camera "lenses" which you can use to take panoramas etc.
    Good luck
    If I have helped at all, a click on the White Star is always appreciated :
    you can also help others by marking 'accept as solution' 

  • Confused again about this

    hi,
    i got my phone this Christmas so my mum charged for me and tested my sim card in it, my sim card is ASDA(but it is connected with Vodafone I think). my Iphone is sim locked to Vodafone, but worked when I rung my house, BUT if I got a top-up via Vodafone, would I get one of the current "freebies" on offer?

    Why do you think other users will have the answer.
    You want to know about the relationship between Asda branded sims and Vodafone who
    provide the carrier service ( I assume from your posts )
    Ask them ie Asda or Vodafone they can give you an answer
    Users here can only guess however well meaning

  • Local patch server confused again

    Starting earlier this week, Solaris 10 clients that connect to our local patch server
    only report that patch 121118-08 is required. Running `smpatch analyze' a week
    ago showed many more patches. After 121118-08 is applied, another `smpatch
    analyze' says `No patches required.'. One of these clients needed 139 patches before,
    and now needs none! What happened?
    Solaris 10 machines that don't go through the local patch server are behaving
    normally. Restarting the local patch server didn't help. The local patch server's
    URL is `https://getupdates1.sun.com/solaris/'. It hasn't been changed for some time,
    and was working a week ago.

    Here's a bit more data. Clearly it's the LPS that's messed up. As you can see above the LPS is getting an old current.zip but the LPS host actually gets the correct one when it goes to the same site to get the same file.
    ljcqs152# pwd
    /var/sadm/spool/cache/Database
    ljcqs152# ls -l
    total 592
    -rw-r--r-- 1 root root 292708 Dec 17 04:25 https%3A%2F%2Fgetupdates1.sun.com%2F%2FDatabase%2Fcurrent.zip
    ljcqs152# unzip -l https%3A%2F%2Fgetupdates1.sun.com%2F%2FDatabase%2Fcurrent.zip
    Archive: https%3A%2F%2Fgetupdates1.sun.com%2F%2FDatabase%2Fcurrent.zip
    Length Date Time Name
    93 12-14-06 23:14 patchlist.properties
    1859331 12-14-06 23:56 patchlist.delimited
    1859424 2 files
    ljcqs152# smpatch get
    patchpro.backout.directory - ""
    patchpro.baseline.directory - /var/sadm/spool
    patchpro.download.directory - /var/sadm/spool
    patchpro.install.types - rebootafter:reconfigafter:standard
    patchpro.patch.source - https://getupdates1.sun.com/
    patchpro.patchset - current
    patchpro.proxy.host usgproxy.cnf.com ""
    patchpro.proxy.passwd **** ****
    patchpro.proxy.port 8888 8080
    patchpro.proxy.user "" ""
    ljcqs152#
    ljcqs152#
    ljcqs152#
    ljcqs152# patchsvr setup -l
    Patch source URL: https://getupdates1.sun.com/
    Cache location: /jumpstart/patches/patchsvr
    Web proxy host name: usgproxy.cnf.com
    Web proxy port number: 8888
    ljcqs152#

  • IPTC confusion - again

    Hi folks,
    since I am using LR 2. 3 (64-Bit edition in my case on Win XP 64bit edition) I encounter a problem with the IPTC handling in the XMP files.
    Whereas formerly there only existed 1 keyword section, there are now two of them. The keyword list of both is identical.
    Does it really make sense to have redundant information?I wonder if this is a bug or a feature.
    The problem I do have with this: I am using a special software (Breeze Browser Pro) for years to manage the entire metadata stuff. Now that these two keyword sections exist, I am no longer able to work with the keywords reliable. Some changes are not visible to LR.
    (Yes, I intend to not use LR for the metadata editing, since BBPro is much for flexilbe, easy to handle many files and much more quicker in
    doing this part of the workflow.)
    How does it look like in the XMP file:
    Keywords 1
    <rdf:Description rdf:about=""
        xmlns:dc="http://purl.org/dc/elements/1.1/">
       <dc:description>
        <rdf:Bag>
        --> list of keywords starts here <--
    Keywords 2
    <rdf:Description rdf:about=""
        xmlns:lr="http://ns.adobe.com/lightroom/1.0/">
       <lr:hierarchicalSubject>
        <rdf:Bag>
        --> list of keywords starts here <--
    Are these two keyword section really necessary?
    Thomas

    ... though I asked LR to re-read the metadata from the XMP file and they are definitely in the keyword-section starting with
    <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
    Hey Thomas!
    I'm not sure why this is happening. The section you indicated is using the Dublin Core Metadata Standard which is generally compatible with all standards compliant software that reads/writes IPTC data. I assume BreezBrowser is among these.
    The second section where the hierarchical presentation of keywords lives is more adobe centric.
    You may have to try some experimentation to see where the process is breaking down.  Make a few copies of some images with the metadata stripped out. One way to do this is to save for web as JPEG from Photoshop.  Put these in their own directory. Import one to LR and give it one keyword. Open the other in BB and give it a different keyword. Then import them each into the other program and assign a third keyword. Something controlled like that to see where the ball gets dropped. Not using hierarchies or synonyms should keep both program concentrating on the section you indicated.
    From all indication at both products' websites they support what you are trying to do.

  • Problem in XML Parsing via oracle procedure...

    Hi,
    I wrote one oracle procedure for xml parsing.
    I have one valid xml file which has "encode UTF-8". The XML file contains some comments also. While we are parsing the xml file at that time it is not parse successfully and also it is not giving any error. After the following line it is skip rest of the codes(lines).
    dbms_xmlparser.parseclob(l_parser, l_clob);
    At the end of the xml file there are some comments which is like "<!-- abc --> ".
    When I am changing the "encode UTF-8 to ISO-88596-1" & removing the comments which wrote on bottom of the file then its working fine, but the files which we are getting from the system is contains the encode UTF-8 and we don't want to preprocess on that xml files. Even if we will do that via shell script or perl script then it will be overhead to the system and in a single stroke our system will parse more than 5k xml files, so if we will do some preprocess on it, it will take some more time approx 1-2 minutes extra.
    So, If someone knows any solution of this problem, then please guide & help me on this.
    My xml file structure is as follows:-
    <?xml version="1.0" encoding="UTF-8"?>
    <mcd xmlns:HTML="http://www.w3.org/TR/REC-xml">
         <child>
              <child1>32.401 V5.5</child1>
              <child2>ZoneGate</child2>
         </child>
         <mc>
              <newid>
                   <id>12</id>
              </newid>
              <mindex>
                   <date>20111102180000</date>
                   <mt>abc1</mt>
                   <mt>abc2</mt>
                   <mvalue>
                        <r>val_1</r>
                        <r>val_2</r>
                   </mvalue>
              </mindex>
         </mc>
    </mcd>
    <!--
    ALARM STATUS
    morning 10
    afternoon 14
    evening 18
    night 22
    -->
    <!--
    PARAM:EID = 1
    PARAM:GId = 3
    PARAM:GSId = 0
    --!>
    And my oracle procedure is as follows:-
    create or replace procedure loadXMLtotable(dir_name IN varchar2, xmlfile IN varchar2) AS
    -- Defining the variables
    ecode               NUMBER;
    emesg           VARCHAR2(200);
    l_bfile      BFILE;
    l_clob      CLOB;
    l_dest_offset      INTEGER:=1;
    l_src_offset      INTEGER:=1;
    l_Char_set_id      NUMBER := NLS_CHARSET_ID('UTF8');
    l_lang_context      INTEGER := dbms_lob.default_lang_ctx;
    l_warning           INTEGER;
    l_parser dbms_xmlparser.Parser;
    l_doc dbms_xmldom.DOMDocument;
    l_nl1 dbms_xmldom.DOMNodeList;
    l_nl2 dbms_xmldom.DOMNodeList;
    l_n dbms_xmldom.DOMNode;
    node1 dbms_xmldom.DOMNode;
    colid integer ; -- column id used for identifying which column it belongs.
    l_xmltype XMLTYPE;
    sub_xmltype XMLTYPE;
    num_nodes number;
    l_index PLS_INTEGER;
    l_subIndex           PLS_INTEGER;
    starttime Date;
         temp_datatime VARCHAR(25);
    columnname varchar2(300);
    columnvalue varchar2(300);
    -- creating a Type which is a type of "test_hem" table RowType, which I created in SVN server
    TYPE tab_type IS TABLE OF test_hem%ROWTYPE;
    t_tab tab_type := tab_type();
    BEGIN
    -- Passing the xmlfile and virtual directory name which we gave at the time of directory creation
    l_bfile := BFileName('MY_FILES', xmlfile);
    dbms_lob.createtemporary(l_clob, cache=>FALSE);
    dbms_lob.open(l_bfile, dbms_lob.lob_readonly);
    --dbms_lob.loadFromFile(dest_lob => l_clob,
    -- src_lob => l_bfile,
    -- amount => dbms_lob.getLength(l_bfile));
    dbms_lob.loadclobfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile),
    l_dest_offset, l_src_offset, l_Char_set_id, l_lang_context, l_warning);
    dbms_lob.close(l_bfile);
    -- make sure implicit date conversions are performed correctly
    dbms_session.set_nls('NLS_DATE_FORMAT','''YYYY-MON-DD HH24:MI:SS''');
    dbms_output.put_line('Date format set');
    -- Create a parser.
    l_parser := dbms_xmlparser.newParser;
    dbms_output.put_line('output 1');
    -- Parse the document and create a new DOM document.
    dbms_xmlparser.parseclob(l_parser, l_clob);
    dbms_output.put_line(' passed parsing');
    l_doc := dbms_xmlparser.getDocument(l_parser);
    dbms_output.put_line(' passed getdocument');
    -- Free resources associated with the CLOB and Parser now they are no longer needed.
    dbms_lob.freetemporary(l_clob);
    dbms_xmlparser.freeParser(l_parser);
    -- Get a list of all the EMP nodes in the document using the XPATH syntax.
    l_nl1 := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'//mcd/child');
    -- Loop through the list and create a new record in a tble collection
    FOR cur_sel IN 0 .. dbms_xmldom.getLength(l_nl1) - 1 LOOP
    l_n := dbms_xmldom.item(l_nl1, cur_sel);
    t_tab.extend;
    -- Use XPATH syntax to assign values to he elements of the collection.
    dbms_xslprocessor.valueOf(l_n,'child1/text()',t_tab(t_tab.last).country);
    -- putting the state and vendorname into the table rowtype
    dbms_xslprocessor.valueOf(l_n,'child2/text()',t_tab(t_tab.last).state);
    END LOOP;
    -- getting the version and putting into the table rowtype
    l_n := dbms_xslprocessor.selectSingleNode(dbms_xmldom.makeNode(l_doc),'//mcd/mc/newid/id');
    dbms_xslprocessor.valueOf(l_n,'id/text()',t_tab(t_tab.last).id);
    -- selecting the nodes whose starting tag is "mindex"
    l_nl1 := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'//mcd/mc/mindex');
    -- checking the total number of nodes whose starting through "mi"
    num_nodes := dbms_xmldom.getLength(l_nl1);
    l_index := 1;
    -- For loop to iterate the nodes.
    FOR cur_sel IN 0 .. dbms_xmldom.getLength(l_nl1) - 1 LOOP
    -- whole current node is selected and storing into the node1 variable
    node1 := dbms_xmldom.item(l_nl1, cur_sel);
    -- setting the xmltype as AL32UTF8
    l_xmltype := xmltype(l_bfile, nls_charset_id('AL32UTF8'));
    -- if selecting parent node containing the mt child node then only proceed else skip that parent node.
    IF (l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mt') > 0 and l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mvalue/r') > 0) Then
    -- fetch the datatime, convert it into to_date format and store it into table rowtype
    temp_datatime := dbms_xslprocessor.valueOf(node1, 'date/text()');
    t_tab(t_tab.last).data_time := to_char(to_date(temp_datatime, 'YYYYMmcDHH24MISS'));
    l_subIndex := 1;
                                  while (l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mt[' || l_subIndex || ']') > 0 and l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mvalue/r['|| l_subIndex || ']') > 0 ) LOOP
                                  -- getting mt and corresponging mvalue/r values
    dbms_xslprocessor.valueOf(node1,'mt[' || l_subIndex || ']/text()',columnname);
    dbms_xslprocessor.valueOf(node1,'mvalue/r[' || l_subIndex || ']/text()',columnvalue);
    l_subIndex := l_subIndex + 1;
    -- getting the column to which this mapping belongs.
    select columnid into colid from abc_table where columnname=name;
    CASE colid
    WHEN 1 THEN t_tab(t_tab.last).col1 := columnvalue;
                             WHEN 2 THEN t_tab(t_tab.last).col2 := columnvalue;
                             WHEN 3 THEN t_tab(t_tab.last).col3 := columnvalue;
    ELSE dbms_output.put_line('No column mapping for counter ' || columnname) ;
    END CASE; -- end of case statement.
    END LOOP;
    -- Insert data into the real table from the table collection.
    FORALL i IN t_tab.first .. t_tab.last
    INSERT INTO test_hem VALUES t_tab(i);
    END IF;
    l_index := l_index + 1;
    COMMIT;
    END LOOP;
    commit;
    EXCEPTION
    WHEN OTHERS THEN
    ecode := SQLCODE;
    emesg := SQLERRM;
    dbms_output.put_line(TO_CHAR(ecode) || '-' || emesg);
         dbms_lob.freetemporary(l_clob);
         dbms_xmlparser.freeParser(l_parser);
         dbms_xmldom.freeDocument(l_doc);
    END;

    Sorry Odie,
    I am new to this site as well as PL/SQL. I am giving additional details which you had mentioned in your last comments.
    our Oracle Database version is "10.2.0.4.0"
    The structure of target table Instrument_Details is as follows:
    Create table Instrument_Details (
    instrument_id          Integer  Primary Key,
    provider_name          Varchar2(32),
    version_number          Varchar2(32),
    location_id                  Integer,
    installation_date             Date,
    granularity                  Integer,
    time_out                  Integer );
    Note:- Here test_hem is alias of Instrument_details.
    Here instrument_id is a primary key.
    provider_name contains the child2 xml tag value.
    version_number contains the child1 xml tag value.
    location_id contains the newid/id value which is map to other table which fetching the location name corresponding to the location_id.
    installation_date contains the date xml tag value.
    Now we have created one mapping tables where we mapped the xml tag values "mt" with table column name means "abc1 = granularity", "abc2 = time_out" in that table.
    these table column value are written under mvalue xml tag.
    _Our Database Character set is_:-
    NLS_CHARACTERSET WE8ISO8859P1
    Now as you suggest me to format your code. I am writing the xml code and procedure code again.
    My xml file structure is as follows:-
    <?xml version="1.0" encoding="UTF-8"?>
    <mcd xmlns:HTML="http://www.w3.org/TR/REC-xml">
      <child>
          <child1>32.401 V5.5</child1>
          <child2>ZoneGate</child2>
      </child>
      <mc>
          <newid>
               <id>12</id>
          </newid>
      <mindex>
           <date>20111102180000</date>
           <mt>abc1</mt>
           <mt>abc2</mt>
           <mvalue>
                 <r>val_1</r>   -- here val_1 and val_2 are numeric values
                 <r>val_2</r>
            </mvalue>
      </mindex>
      </mc>
    </mcd>
    <!--
    ALARM STATUS
    morning 10
    afternoon 14
    evening 18
    night 22
    -->
    <!--
    PARAM:EID = 1
    PARAM:GId = 3
    PARAM:GSId = 0
    --!> And my oracle procedure is as follows:-
    create or replace procedure loadXMLtotable(dir_name IN varchar2, xmlfile IN varchar2) AS
    -- Defining the variables
    ecode NUMBER;
    emesg VARCHAR2(200);
    l_bfile BFILE;
    l_clob CLOB;
    l_dest_offset INTEGER:=1;
    l_src_offset INTEGER:=1;
    l_Char_set_id NUMBER := NLS_CHARSET_ID('UTF8');
    l_lang_context INTEGER := dbms_lob.default_lang_ctx;
    l_warning INTEGER;
    l_parser dbms_xmlparser.Parser;
    l_doc dbms_xmldom.DOMDocument;
    l_nl1 dbms_xmldom.DOMNodeList;
    l_nl2 dbms_xmldom.DOMNodeList;
    l_n dbms_xmldom.DOMNode;
    node1 dbms_xmldom.DOMNode;
    colid integer ; -- column id used for identifying which column it belongs.
    l_xmltype XMLTYPE;
    sub_xmltype XMLTYPE;
    num_nodes number;
    l_index PLS_INTEGER;
    l_subIndex PLS_INTEGER;
    starttime Date;
    temp_datatime VARCHAR(25);
    columnname varchar2(300);
    columnvalue varchar2(300);
    -- creating a Type which is a type of "Instrument_Details" table RowType, which I created in SVN server
    TYPE tab_type IS TABLE OF Instrument_Details%ROWTYPE;
    t_tab tab_type := tab_type();
    BEGIN
    -- Passing the xmlfile and virtual directory name which we gave at the time of directory creation
    l_bfile := BFileName('MY_FILES', xmlfile);
    dbms_lob.createtemporary(l_clob, cache=>FALSE);
    dbms_lob.open(l_bfile, dbms_lob.lob_readonly);
    --dbms_lob.loadFromFile(dest_lob => l_clob,
    -- src_lob => l_bfile,
    -- amount => dbms_lob.getLength(l_bfile));
    dbms_lob.loadclobfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile),
    l_dest_offset, l_src_offset, l_Char_set_id, l_lang_context, l_warning);
    dbms_lob.close(l_bfile);
    -- make sure implicit date conversions are performed correctly
    dbms_session.set_nls('NLS_DATE_FORMAT','''YYYY-MON-DD HH24:MI:SS''');
    dbms_output.put_line('Date format set');
    -- Create a parser.
    l_parser := dbms_xmlparser.newParser;
    dbms_output.put_line('output 1');
    -- Parse the document and create a new DOM document.
    dbms_xmlparser.parseclob(l_parser, l_clob);
    *-- Below lines are skipping....*
    dbms_output.put_line(' passed parsing');
    l_doc := dbms_xmlparser.getDocument(l_parser);
    dbms_output.put_line(' passed getdocument');
    -- Free resources associated with the CLOB and Parser now they are no longer needed.
    dbms_lob.freetemporary(l_clob);
    dbms_xmlparser.freeParser(l_parser);
    -- Get a list of all the EMP nodes in the document using the XPATH syntax.
    l_nl1 := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'//mcd/child');
    -- Loop through the list and create a new record in a tble collection
    FOR cur_sel IN 0 .. dbms_xmldom.getLength(l_nl1) - 1 LOOP
    l_n := dbms_xmldom.item(l_nl1, cur_sel);
    t_tab.extend;
    -- Use XPATH syntax to assign values to he elements of the collection.
    dbms_xslprocessor.valueOf(l_n,'child1/text()',t_tab(t_tab.last).country);
    -- putting the state and vendorname into the table rowtype
       dbms_xslprocessor.valueOf(l_n,'child2/text()',t_tab(t_tab.last).state);
    END LOOP;
    -- getting the version and putting into the table rowtype
       l_n := dbms_xslprocessor.selectSingleNode(dbms_xmldom.makeNode(l_doc),'//mcd/mc/newid/id');
      dbms_xslprocessor.valueOf(l_n,'id/text()',t_tab(t_tab.last).id);
    -- selecting the nodes whose starting tag is "mindex"
      l_nl1 := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'//mcd/mc/mindex');
    -- checking the total number of nodes whose starting through "mi"
      num_nodes := dbms_xmldom.getLength(l_nl1);
    l_index := 1;
      -- For loop to iterate the nodes.
      FOR cur_sel IN 0 .. dbms_xmldom.getLength(l_nl1) - 1 LOOP
      -- whole current node is selected and storing into the node1 variable
      node1 := dbms_xmldom.item(l_nl1, cur_sel);
      -- setting the xmltype as AL32UTF8
       l_xmltype := xmltype(l_bfile, nls_charset_id('AL32UTF8'));
      -- if selecting parent node containing the mt child node then only proceed else skip that parent node.
        IF (l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mt') > 0 and l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mvalue/r') > 0) Then
      -- fetch the datatime, convert it into to_date format and store it into table rowtype
        temp_datatime := dbms_xslprocessor.valueOf(node1, 'date/text()');
        t_tab(t_tab.last).data_time := to_char(to_date(temp_datatime, 'YYYYMmcDHH24MISS'));
        l_subIndex := 1;
       while (l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mt[' || l_subIndex || ']') > 0 and l_xmltype.Existsnode('//mcd/mc/mindex[' || l_index || ']/mvalue/r['|| l_subIndex || ']') > 0 ) LOOP
    -- getting mt and corresponging mvalue/r values
       dbms_xslprocessor.valueOf(node1,'mt[' || l_subIndex || ']/text()',columnname);
      dbms_xslprocessor.valueOf(node1,'mvalue/r[' || l_subIndex || ']/text()',columnvalue);
      l_subIndex := l_subIndex + 1;
      -- getting the column to which this mapping belongs.
      select columnid into colid from abc_table where columnname=name;
      CASE colid
      WHEN 1 THEN t_tab(t_tab.last).col1 := columnvalue;
      WHEN 2 THEN t_tab(t_tab.last).col2 := columnvalue;
      WHEN 3 THEN t_tab(t_tab.last).col3 := columnvalue;
          ELSE dbms_output.put_line('No column mapping for counter ' || columnname) ;
      END CASE; -- end of case statement.
      END LOOP;
    -- Insert data into the real table from the table collection.
      FORALL i IN t_tab.first .. t_tab.last
        INSERT INTO test_hem VALUES t_tab(i);
      END IF;
      l_index := l_index + 1;
    COMMIT;
    END LOOP;
    commit;
    EXCEPTION
      WHEN OTHERS THEN
      ecode := SQLCODE;
      emesg := SQLERRM;
      dbms_output.put_line(TO_CHAR(ecode) || '-' || emesg);
      dbms_lob.freetemporary(l_clob);
      dbms_xmlparser.freeParser(l_parser);
      dbms_xmldom.freeDocument(l_doc);
    END;Thanks in advance for your help...

  • Release procedure problem and error

    Dear Friends ,
    I facing some major problems in release procedure , i had configured one release procedure in 4levels , due to some reason i had deleted 3release groups and codes due to it was not working . But after deleteing  in purchase order it showing all release level and only firest level is working unable to make MIGO and other release levels are not working  . The relese code which i had created is appearing in RFQ/CONTRACT etc automatically . I had not created for this any release level . It's very very different case ....till date never faced and heared . How to resolve this probelm . Due to what reasons this kind of problems occurs .
    RB

    Hi,
    Try  to delete all the release procedure available in the system.
    First  try to do the documents coorectly and configure.
    You might have done mistake in assigning the charcteristics to the class
    Please try create a NEw release procedure once again.
    Don't worry about the procedure in the RFQetc...
    G.Ganesh Kumar

  • Confused by the removal of aggregate/index tables in HANA

    Hiya,
    I've heard that HANA removes the need for aggregate and index tables like BSIS, BSAS, VRPMA etc.
    Is HANA smart enough to do this? Or does Simple finance (sFIN) do this?
    I mean if we were to replace our Oracle DB with HANA would the index tables no longer exist?
    Or would we then need to implement simple finance to then remove the need for index tables?
    Thanks in advance!

    "HANA is just the DB."
    I wouldn't say it's "just" a DB, but for the point we're making here you can say that SAP HANA is mainly used as a DBMS and not as a application platform.
    "To remove index tables, aggregate tables etc you can activate business functions through SFW5 to improve specific lines of business."
    That's not generally true. Some enhancements (like the VBOX removal) are delivered via enhancement packages. These change the software, but typically don't make a new product out of your system.
    "Installation of sFIN, or S/4HANA contain more deeper changes to both the tables and ABAP code - that improve speed and efficiency."
    Nope, these are actual new implementations. These are new programs that do similar things as the former NetWeaver programs. But they are newly written code.
    This allows for much more radical redesign of functionality leading (hopefully) to even more improvements.
    Coming back to your first sentence: the more radical the software changes the more tightly integrated the solution will be with SAP HANA. More and more function will actually run "in" SAP HANA, making it more than just the DB.
    Ok, I hope this didn't increase the confusion again.
    Cheers,
    Lars

  • Yosemite suddenly logs me out and in again

    Since updating to Yosemite I am facing some strange issues.
    While surfing of Working on my MacBook Pro (Late 2011) it suddenly logs me out and immediate in again.
    All open windows reappear but the whole startup procedure starts again.
    All connected or opened Drives and Images need to be reopened.
    As I'm working with this Computer also for my DJ-Gigs I think it's a very high risk at the moment to do a gig with this OS.
    I don't want to get logged out suddenly during the audience is listening to the music.
    Any guesses?
    Is it a bug or a new feature which can be switched off?
    I already checked for the Autologout after XX minutes of inactivity - it's not activated in my Preferences.

    When you have the problem, note the exact time: hour, minute, second.  
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
    Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • PO Release Procedure Issue

    Hi,
    I had done SPRO settings for Purchase Order release properly with a condition that if the total value is >1,000 EURO the order has to be released. I had checked in the simulation and it is working fine.
    But when I am creating a PO whose value is more than 1,000 euros , i am not getting the PO Release tab in the po header on saving the document. Checked the procedure once again and it is looks fine....
    Please advice what might be the possible reasons for the same.
    Thanks ,
    Vengal Rao.

    Hi Ajit,
    Thanks ...
    As release strategy was not entered , the procedure did not work, I deleted the existing one and created a new one using CL20N and now it is working.
    Regards,
    Vengal Rao.

  • Query slower in stored procedure(after upgrade to 16)

    Hi all,
    We are looking to upgrade our SQL Anywhere 9 database to 16. We thought version 16 is slower in update tables, but the reason of slowness are query's in stored procedures called from the trigger. One of the query's has a duration of 8 times the duration in version 9!! When I run the query in Interactive Sql(v16), they run fast like version 9. So the query runs slower in a stored procedure.
    I thought parameter sniffing, but it's not MS Sql Server. I've no idea why it was good in v9 and bad in v16. Have someone a idea?
    It's a query with subquery's in the where , a view in the from. In the view are unions. Looks not so special.
    thanks

    It may be more convenient for you to ask this question on the other forum: SAP SQL Anywhere Forum
    Preamble...
    It sometimes happens that (a) the same query will perform faster or slower in different versions because of different behaviors by the query optimizer. In most cases a minor change is necessary to restore good performance; in some rare cases, the changes are difficult.
    It also sometimes happens that (b) the same query will perform faster or slower under different operating conditions; e.g., client request (ISQL) versus inside a BEGIN block (stored procedure). Again, minor changes all that's required in most cases, sometimes otherwise.
    Details...
    In order to help, we will need more information. Two graphical plans with statistics for the same problematic query, both using V16, one captured in ISQL, and the other one captured inside the stored procedure, is the best way to pass on the information; ALL OTHER forms are inadequate, especially prose descriptions and edited snippets of code (that way lies frustration for all parties).
    There are a number of articles about graphical plans on this blog.

  • Confused with the internal table

    Hello,
    I am getting confused again by the usage of work space for an internal table.
    Say for example I have a internal table itab that is defined as:
    DATA:ITAB TYPE STANDARD TABLE OF Txxx.
    Then I define a work space for the internal table.
    DATA:WS_ITAB LIKE ITAB.
    Now say for example, I would like to fill in some data to this internal table, can I do:
    WS_ITAB-FIELD1 = 3.
    APPEND WS_ITAB INTO ITAB INDEX 1.
    where FIELD1 is a valid field in Txxx?
    If not, how should I accomplish my goal? Thanks a lot!

    Yes, you have the right idea.  When working with work areas it is a good idea to define them like line of itab. This way, anytime itab changes, the wa will also be updated.
    DATA: ITAB TYPE STANDARD TABLE OF Txxx.
    <b>data: wa like line of itab</b>.
    You can add a line to your internal table by filling the work area and appending to the internal table.
    wa-fld1 = 'A'.
    wa-fld2 = 'B'.
    wa-fld3 = 'C'.
    append wa to itab.
    You can insert into a specific index by using INSERT.
    Insert wa into itab index 1.
    Regards,
    Rich heilman

Maybe you are looking for

  • Multiple Samsung Stratosphere problems after FF1 update

    There have been multiple posts on various issues users have found after the recent Stratopshere FF1 update.  Some were replys to older posts and some only touched on a single issue.  I wanted to consolodate into one thread, and hopefully get teh atte

  • How to read this xml

    I have the following xml <title>Title1      <alternative>Sub Title</alternative> </title> How to get the value "Title1" only from the above xml without considering the child tag <alternative>? thanks Deb

  • Beginner question: can i have 16x9 and 4x3 footage on the same timeline?

    Hi, I am assembling a highlight promo reel for somebody and i have 16x9 and 4x3 footage. not sure what to do or which footage to convert, since i need them both for the promo. any suggestions would be appreciated, or please direct me to a past discus

  • What about customers with Flash blocked?

    Hi! We're developing Flex solutions for clients, and one of our clients asked about their customers and what happened if they have Flash either not installed at all or Flash content blocked. This could be for (real or perceived) security reasons, or

  • NI 1073 PXI chassis

    HI     I have a new chassis 1073     If in MAX I try to open a Visa Test panel I receive this warning message( cf the attached capture file) it isa usual?     We develop a PXIe card( arb wavefor generator) with PLX8311 PXIe-local bus bridge. When we