Index out of County

Hi all

I create a procedure for my goal of learning and uses the HR schema. Now the problem is that when I run my procedure, then I get the error mentioned topic. I know there is a problem with the code "l_salary (l_salary.count + 1): = l_employee_id (indx) .salary;' but unable to solve." Help you in this regard will be appreciated. Thank you

My procedure

create or replace

PROCEDURE increase_salary

(dept_id_in IN VARCHAR2)

AS

TYPE emp_id_t IS TABLE OF employees % rowtype;

TYPE emp_sal_t IS TABLE OF THE employees.salary%TYPE;

l_employee_id emp_id_t: = emp_id_t ();

l_salary emp_sal_t: = emp_sal_t ();

BEGIN

SELECT *.

LOOSE COLLECTION l_employee_id-, l_salary

Employees

WHERE department_id = dept_id_in;

FOR indx IN 1.l_employee_id.count

loop

dbms_output.put_line ('EMPLOYEE_ID =' | l_employee_id (indx) .employee_id |) "salary =' | l_employee_id (indx) .salary);

IF l_employee_id (indx) .salary > 6000 THEN

l_salary (l_salary.count + 1): = l_employee_id (indx) .salary; - problem is here, I think

dbms_output.put_line (' salary ='| l_salary (indx));

END IF;

END loop;

END;

Concerning

Shu

979596 wrote:

l_salary (l_salary.count + 1): = l_employee_id (indx) .salary; - problem is here, I think

dbms_output.put_line (' salary ='| l_salary (indx));

First issue: you need extend the collection first. Change:

l_salary (l_salary.count + 1): = l_employee_id (indx) .salary;

TO

l_salary.extend;

l_salary (l_salary.count): = l_employee_id (indx) .salary;

Second question: bad index. Change:

dbms_output.put_line (' salary ='| l_salary (indx));

TO:

dbms_output.put_line (' salary ='| l_salary (l_salary.) Count));

SY.

Tags: Database

Similar Questions

  • Why do I receive errors of internal software: Terminal Index out of Bounds. Code error-61350, when compiling my FPGA VI for a cRIO-9118 using NI 9223?

    I get the error (in a popup window) when my VI FPGA code in chassis 9118 OR NI 9223 module compiled help.  This error occurs when compiling the process (generating intermediate files, scene 7 of 7). How to solve this error?

    Thank you

    additional information:

    Original error message:
    -------------------------

    Errors:

    Software (s) internal error: Terminal Index out of Bounds.

    :-61350 error code

    Details:

    A terminal with this index does not exist on this block diagram node.
    NiFpgaHandleCallbackError.vi

    «"" "String of full appeal:»»"»
    NiFpgaHandleCallbackError.vi
    niFpgaNodeInformation.lvclass:Get Const Variant.vi
    DfirModGen.lvclass:GetConstant.vi
    niLvFpgaMungerBrainwashIONodeCommon_Dfir.vi
    niLvFpgaMungerBrainwashSingleIOGrowableMethod_DFIR.vi
    nirviEIOMethodImplementation_SpecifyDFIR.vi
    nirviEIOMethodImplementation_SpecifyDFIR.vi.ProxyCaller

    Hi tesa,.

    This is a bug that has been fixed in LabVIEW 2012 SP1. The number of CAR created for this bug is 332811 and as you can see in this link, it is already in the list of bug fixes.

    Carmen C.

  • can't load games run time error list index out of bounds

    I support the game
    Go through acceptance, for example windows next
    is the end and the foregoing notice arrives ' runtime error 62:2395 list index out of bounds ".

    I always downloaded from this show and didn't have problems now

    Hi Terrinicholson,

    1. what game you are trying to download?

    2. what web browser do you use?

    3. This only happens with a specific Web site?

    4. have you made a recent software or hardware changes to the system?

    If you use Internet Explorer, you can read the following article and check if it helps:

    The problems of games online using Internet Explorer

  • Message "List index out of bounds" appears when I try to get a file from the FLAME of my E: drive. What should I do?

    I use Apophysis7x15 c.9 fractal generator program that I downloaded years ago and have used every day since I downloaded it. It creates. FLAME files to save on my E: drive. Today I tried to recover the files already stored on the flash drive to complete the work on the image I have for years, and he gave me the message "List index out of bounds" and refused to access my folder. What can I do to fix this? The last time that my computer had an update was on 21/09/2012 from Microsoft for the Microsoft Windows security update. I used these files several times since then.

    [Moved from comments]

    Hello

    Look for when I try to make it is an error "List index out of bounds-1. How can I fix this?

    at the bottom of this page:

    http://apophysis.xyrus-Worx.org/

    Hope this helps,
    Don

  • HP Deskjet 1512: List index out of bounds for Deskjet 1512

    Try to print lists of names of files and their size, developed by STG printed case, results in an error message of "List Index out of bounds".  The printer is a HP Deskjet 1512. Using Windows 7.

    All solutions?  Thanks in advance.

    Thanks for your reply. My problem was eliminated by mearly restart the program.  I would have thought this before spending several hours looking for a solution in my HP printer setup.

  • Software of self-esteem gets error - index out of bound(-1)

    When I run the Selfmage software it get me "list index out of bound(-1) error '...

    and I have no idea about this error so please help me with it...

    Hello fabdullah127,

    You could try the Compatibility Mode and see if this is useful for you.
    If the program is not compatible, then you try to install and run the program in compatibility mode.
    Use the following steps:
    (1) right click on the program
    2) click Properties
    3) click on the Compatibility tab
    (4) select run this program in compatibility mode and select Windows Vista or other operating system, the program has been run successfully.

    Check out the link here: make sure to run older programs in this version of Windows

    http://Windows.Microsoft.com/en-us/Windows7/make-older-programs-run-in-this-version-of-Windows

    If compatibility is not successful, then try and run the program compatibility problems:

    1. open the troubleshooting program compatibility Troubleshooter by clicking the Start button.

    Then click on Control Panel. In the search box, type troubleshooting, and then click Troubleshooting. Under programs, click on run programs for previous versions of Windows.

    2. follow the instructions in the troubleshooting.

    If you are unable to install a program, insert the installation disc for the program and, using the Troubleshoot utility, navigate to the program setup file, usually called Setup.exe, Install.exe, or something similar. This utility is not designed to work on programs that have an .msi file name extension.

    If this does not help, if you are using Windows 7 Professional or ultimate, you can use Windows XP mode and Virtual PC. If you run Windows 7 Home Premium, you will need to check virtualization 3rd party programs to see if the software works on it.

    I hope this helps to answer your questions.

    Sincerely,

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Error "Index out of range" on search query

    I have a configuration of search query to clear my listview and insert new results of the query in the listview. The code looks like this:

    {OnDataLoaded}

    _APP. Clearlist

    root. ListView.insertlist (Data)

    }

    {OnQueryChanged}

    Load();

    }

    But unfortunately, whenever I do a query, and as a result appears my query update (triggered from a contextual menu) does not work and gives me the error "Index out of range". Even if the results of the query to fill listview very well and when I tap on a result it shows all data fine as well.

    And FYI the update query does not work when the list is not be searched or filtered so I don't think that there is a problem with my function.

    What I am doing wrong?

    He solved.  The problem is that the update function trying to remove and add the updated item within the filtered datamodel causing problems.  I just got the datamodel to load before performing the functions as described below:

    bool App::updateObject(const QString &id, const QString &name, const QString &description, const QString &datefield, const QString &lat, const QString &lon, const QString &categoryfield, const QString &mapurl, const QString &itempic)
    {
        bool updated = false;
        bool saved = false;
    
    //    if (!validateID(id))
    //        return false;
    
        Location *location = new Location(id, name, description, datefield, lat, lon, categoryfield, mapurl, itempic);
    
        // Find location in the datamodel.
        // Only the id is used by find(). This is because location
        // defines equality (==) as having the same id. (See the definition of "=="
        // in the location class.)
        const QVariantList updateIndexPath = m_dataModel->find(location);
    
        // update the item if found
        if (updateIndexPath.isEmpty()) {
            alert(tr("Object ID not found."));
            updated = false;
        } else {
            load();
            updated = m_dataModel->updateItem(updateIndexPath, location);
        }
    
        // Save the datamodel if we updated something.
        if (updated) {
            m_storage->deleteFromDB(id);
            saved = m_storage->save(m_lastCustomerID, m_dataModel);
            load();
            refreshGroup();
    
        }
    
        return (updated && saved);
    }
    
  • List index out of bounds (3) - error message of AVS video Converter

    Hello.  When I try and run my AVS Video Converter (8) I now have the error "List index out of bounds (3)" above.  This has only started happening after the best part of two years of successful use of the program.  Any ideas/suggestions?

    Thank you (in preparation),

    Brett

    You can try to contact the support of the AVS for assistance:

    http://support.AVS4YOU.com/login.aspx

  • Error Unc.Exception for blackBerry 8310 Curve Smartphones: string index out of range: 0

    I get the following error message: "Eception Exception: string index out of range: 0" and no way to clear the message.

    Could someone help me to fix it? In fact, the only way to get the BB 8310 back to work is the battery.

    Thanks adavance

    You continue to misinterpret the contractual agreement for the support that YOU are bound to. You should contact your mobile service provider who can escalate your case RIM, how the ability to submit the report could well exist.

    All this debate aside courses... 9 times out of 10 if people just try some things in my first response, it solves their problems... normally a clean OS Reload did the trick as a "worst case"... that or update the operating system to something more current.

  • java.lang.StringIndexOutOfBoundsException: String index out of range: 22

    Hi all

    I developed a relationship in the generator and a form of parameter in the form builder.

    I'm passing a number of the report parameter. For most values of the generated reports are perfectly fine.

    However, for input bit I am facing the following error:

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    java.lang.StringIndexOutOfBoundsException: String index out of range: 22

    at java.lang.String.charAt(String.java:444)

    at oracle.reports.rwclient.URLParser.parseQueryString(URLParser.java:142)

    at oracle.reports.rwclient.URLParser.parseQueryString(URLParser.java:68)

    at oracle.reports.rwclient.RWClient.processRequest(RWClient.java:1382)

    at oracle.reports.rwclient.RWClient.doGet(RWClient.java:366)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

    to com.evermind [Oracle Application Server containers for J2EE 10 g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter (ResourceFilterChain.java:65)

    at oracle.security.jazn.oc4j.JAZNFilter.doFilter (unknown Source)

    to com.evermind [Oracle Application Server containers for J2EE 10 g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke (ServletRequestDispatcher.java:663)

    to com.evermind [Oracle Application Server containers for J2EE 10 g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal (ServletRequestDispatcher.java:330)

    to com.evermind [Oracle Application Server containers for J2EE 10 g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest (HttpRequestHandler.java:830)

    to com.evermind [Oracle Application Server containers for J2EE 10 g (10.1.2.0.2)].server.http.HttpRequestHandler.run (HttpRequestHandler.java:285)

    to com.evermind [Oracle Application Server containers for J2EE 10 g (10.1.2.0.2)].server.http.HttpRequestHandler.run (HttpRequestHandler.java:126)

    to com.evermind [Oracle Application Server containers for J2EE 10 g (10.1.2.0.2)] .util. ReleasableResourcePooledExecutor$ MyWorker.run (ReleasableResourcePooledExecutor.java:192)

    at java.lang.Thread.run(Thread.java:534)

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    I tried to run a form of parameter in debug mode, but after running successfully setting-form code, this error is thrown at the end leaving me in a dark room at the exact location of the error of debugging.

    We hope to get a good sense of you people.

    Kind regards

    Misbah Mehboob Awan.

    If you look at your example you & sign that is not escaped.

    P_SUIT_NATURE = suit % 20% 20Declaration % 20&% 20Permanent % 20Injunction

    replace & sign with 26%

  • Error running of CFCS. Parameter index out of range (2 > number of parameters, which is 1)

    Hello

    My CFC component is defined as:

    < name cffunction output = "updateNote" = "false" access = "remote" returntype = 'Cancel' >

    < name cfargument = "notedetails" required = "true" type = "string" >

    < name cfargument = "notename" required = "true" type = "string" / >

    < cfquery name = "qupdateNote" datasource = "notes_db" >

    UPDATE

    Notes

    SET

    Notes.notedetails = < CFQUERYPARAM CFSQLTYPE = "CF_SQL_VARCHAR" VALUE = "#ARGUMENTS.notedetails #" >.

    WHERE

    notename = "< CFQUERYPARAM CFSQLTYPE ="CF_SQL_VARCHAR"VALUE =" #ARGUMENTS.notename # "" > ""

    < / cfquery >

    < / cffunction >

    In Flash builder when I test the operation I get this error:

    "There was an error when calling the operation. Check your server settings and try to call again the operation.

    Reason: Server error unable to invoke CFC - error running query database. Parameter index out of range (2 > number of parameters, which is 1). »

    IM quessing that it really is something small, but now its making me pull my hair on my head! Arghhh. Tried a lot of things but I know thik im stuck.

    Help would be very much appreciated.

    Thank you

    The sql error is a comma.

  • String index out of range: 0

    I get a "String index out of range: 0.

    I have a program where it checks the user name and password, then if all is true, that he puts the identification number of the user in a session called userID variable (session. User name) for some reason it goes on to say that the variable is not defined. Activate session inside a function variables or can within a component?

    should be

    CR

  • String index out of range-2

    I tried to solve this problem for some time and may not know what the problem is, I have a form of three pages (each page shows in the next and past the form values in hidden fields) who when he submits to the action page comes up with error message string index out of range-2 , I checked, checked, double and triple checked my code for spelling mistakes or lack of form fields, but everything seems fine. I enclose the code page of the action page and the submission page, anyone who might be able to shed light on this will be either highly praised!

    I finally thought to it, despite overlapping each page several times for misspellings, I found that I had a field with a misspelled domain name. The way I found it was to remove the formfields cfinsert statement attribute, which then came and told me that "n/a" not found in the table, so by deleting this rogue 'i', I found the problem!

  • Run the error 9 times index out of range

    When I run a program and sync with it, I get an error: run index error 9 times out of bounds.

    the program runs perfectly on XP but not on vista

    It is quite possible that the program works well in a virtual machine. I fear that only the developer will be able to figure it out for you. I'm sorry that I wasn't able to help you. MS - MVP - Elephant Boy computers - don't panic!

  • BlackBerry Smartphones Eception exception String index out of range: 31

    Cannot get into my messages. Have tried all the restarts, and a wipe, and has not been corrected.  Please help someone!

    Hi mel1545

    You have recently installed applications?  If so, I'll try to uninstall and try again.  If you install all the applications, I suggest to make a backup of your BlackBerry smartphone and then reload the software as described in the article below:

    KB11320 - how to perform a clean reload of the BlackBerry Device Software using BlackBerry Desktop M...

    Thank you

Maybe you are looking for