Impossible to extract and display the records

Hi, I'm using Oracle 11 g

The procedure is compiled without any errors.

The select statement retrieves records well when they are run in SQL promt.

But the same records are not displayed in this procedure by extraction of the cursor.

Last post in the 'done' procedure is also displayed.

Please help me retriving records.

--------------------------------------------------------------------------------------------------------

create or replace procedure disp_rec (vid IN varchar2, vfeat in numbers)
is

cursor c1 is select gid, listagg (vindex, ',') within the Group (order by tid) idx from ridrecords where idarpt = vid and feattype = vfeat group by gid;

type vg is table of number;
type vi is table of the varchar2 (3500);

a vg;
b vi.

Start

If vfeat = 0 then
Open c1;
loop
collect the fetch c1 into loose in a, b;
When exit c1% notfound;
for indx in a.first... a.Last loop
dbms_output.put_line ((indx) a | b (indx));
end loop;
end loop;
Close c1;

elsif vfeat = 1 then
Open c1;
loop
collect the fetch c1 into loose in a, b;
When exit c1% notfound;
for indx in a.first... a.Last loop
dbms_output.put_line ((indx) a | b (indx));
end loop;
end loop;
Close c1;

end if;

dbms_output.put_line ('completed');
end disp_rec;

It depends on what will be different on the input values.

Your original example two blocks has done the same at first glance.

For example, you can do

Start

Open c1;

loop

collect the fetch c1 into loose in a, b LIMIT l_limit;

If l_input = 0 then

ForAll indx in 1... a .count

Update emp2 ename set = b (indx)

where empno = a (indx);

elsif l_input = 1 then

ForAll indx in 1... a .count

Remove emp2

where empno = a (indx);

end if;

When the output $a.count<>

end loop;

Close c1;

dbms_output.put_line ('completed');

end;

Tags: Database

Similar Questions

  • Open a new window and displays the record using JavaScript information

    I would be very grateful if someone could help with the following query. I produced a simple database using APEX, a page that displays all the records that are currently (in the form of tables). However, due to the amount of information and the resolution of the screen, not all columns are displayed on the resulting web page.

    I would like to change by making the information contained in a hyperlink column, which, once pressed will open a new window containing most (if not all) of the information for the particular record.

    I think that this requires JavaScript and, possibly, SQL, however, I do not know where to start.

    Can anyone provide any assistance will be appreciated.

    If you need additional information, let me know.

    You can start with this:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:23

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • Impossible to extract and run the update of BIOS HP Proliant ML350 G4

    Hi guys,.

    I currently have a problem with my server ESX/ESXi 3.5.  I try to update firmware BIOS but were unsuccessful.

    I downloaded the required files and followed the instructions from HP but nothing helped.  After running the command "sh cp006541.scexe" root I get the following error:

    cp006541.scexe: could not find a required program.

    Make sure that these programs are on the path: tar gzip tail sleep mkdir rm

    I can verify that gzip and tar are installed on the server.  Is that what I am logged in as root and it will not work?

    CD HP SmartStart does not host VMware ESX support so I can't use this CD either.

    Can someone please help me with this problem that I can't find information on hp.com

    Your help is appreciated

    Kind regards

    Angelo

    ESXi is not a Linux environment.

    To manage updates of the firmware of the hardware, the best way is the tool from the seller.

    HP as a live CD that can perform this task.

    André

  • Impossible to download and update the app on the iPhone 6 Plus

    Topic: impossible to download and update the app on my iPhone 6 Plus

    Turn off your device and turn it on again. If this does not help, sign out of your account and reconnect.

    In addition, you can try to reset your settings.

    • Press and hold the sleep/wake button
    • Press and hold the Home button
    • Press and hold both buttons until the display turns off and on again with the Apple logo on the subject.

    Alternatively, you can go to settings - general - reset - Reset all settings

  • Link to information from tables and display the 'best '.

    Hello! I'm totally new to this great software, and the truth is that I lost D:
     
    I try to explain in more detail what I have to do, I hope you can help me please it is urgent T_T

    I do 3 tables must be related to each other, that is to say a table where a username will be manually enter, another where you manually enter the user name and the third which will automatically enter power of each user (for automatic writing, I'll use random data). Each table will have a box number, for example:
     
    Table 1, box 1: Paul
    Table 2, box 1: door
    Table 3, box 1: 3.74
     
    Table 1, box 2: Miguel
    Table 2, box 2: Ramos
    Table 3, zone 2: 4.99
     
    Table 1, box 3: Maelle
    Table 2, area 3: Branco
    Table 3, case 3: 4.98
     
    I mean, I bind the box to one table with the other three. And because the program must compare the data in table 3 (power) and display the data of the user of best (which has the highest power). In this example, the program should appear:
     
    BEST USER:
    NAME: MIGUEL RAMOS
    POWER: 4.99

    (Is not slender record information when I close the program)

    I don't know if I ask you very much, I have a very clear idea in my head of what I have to do, but being a new software for my not know how to implement it.

    Thank you in advance for your quick response and help and ilustrative! xD

    Have you tried something with the basic understanding of your question check if this is what you need?

    -Still not clear what you mean by table? (In my opinion, the table is 2d array of values here, otherwise please let me know.)

    -C' is the reason why I asked you to show your code you did then it will be clearer.

  • How to display the records from a query in the non-base data field

    Hello

    I have a problem:
    I have a query with a lot of tables and column 6 (select a, b, c, d, e, f x, y, z, t, s, g where the conditions) and I use 3 parameters.
    I create 3 settings: datai,: dataf and: partner and a button with a trigger when the button is pressed.
    Then a create a block manually with six field non-database a1, b1, c1, d1, e1, f1.
    Now, I want to display all the records in my query in a1, b1, c1, d1, e1, f1 where a1 = a, b1 = b, etc. and all the records (if I have 20 record, it will display 20 records in the non-base data field) when I press the button.

    How I did it:
    I create a cursor with the query, and then
    start the open cursor
    loop
    Fetch cursor in: a1,: b1,: c1: d1: e1,: f1;
    end loop;
    close the cursor;
    end;

    It displays a single record in a1, b1, c1 only, and it must display 100 records and date for all fields.

    Can someone help me with this problem?
    Thank you.

    Published by: 928437 on October 1, 2012 02:55

    Creating a view and the query in a database block are a great solution.

    To use the block non-base of data:
    You are missing the most important Next_Record; command.

     Begin
    Go_block('X'); -- block X is the non-database block
    Clear_Block(No_Validate);
    open cursor X1;
    loop
    If :System.Record_status != 'NEW' then
    Next_Record;
    End if;
    fetch X1 into :a1,:b1,:c1,:d1,:e1,:f1;
    Exit when X1%NOTFOUND;
    end loop;
    close X1;
    end;

  • Help! My iPod Classic 120 G froze. Pale = 'Media-In' and display the screen = "OK to disconnect with a bar in the middle." Tried the reset procedure, press the "Menu and Center." Without success. Any ideas?

    Help! My iPod Classic 120 G froze. Pale = 'Media-In' and display the screen = "OK to disconnect with a bar in the middle." Tried the reset procedure, press the "Menu and Center." Without success. Any ideas?

    See Re: corrupted iPod classic. If she does not really have a reset set it aside and let the battery completely discharge. It should reset itself when you load again.

    TT2

  • Search a directory of data and display the data that is within the range of dates

    Hello

    I have a full idrectory of data from overtime, and I think of search in the directory and display the data files for specific dates. I only started this encoding yet but I figure I'll take the brain of some SMEs here labview and start in the right direction. My goal is to go through a comprehensive directory of data taken for a month or MORE csv files and select the data to process and display office files the date of its registration. If I take the data of last week, last month or last minute, it should just treat as an exact or more.

    Please help me get started on the right foot

    End date will be probably greater than the start date, right? So, end date must connect at the entrance to the upper limit. Then wire in the range? to the conditional terminal of a tunnel of conditional indexation.

    Lynn

  • Search for a similar string in the 2D array and displays the result with another column

    Hello

    One who can help, I have a chart 2D of txt file that have as many lines and 5 columns and I want to do a search and display the other results of the column.

    For example.

    Column 0                      1                           2                                  3                           4

    12345 qwer asdf 12qwe tjhrtyert

    werr 23568 wef fgertge fsefff

    If I manage to find 12345 and I want to display 12qwe, what should I do in labview? Help, please!

  • Want to access a SOAP service and display the data in the external list

    Hello

    I could see a WCF Service via the type of external content successfully. Now I want to access a SOAP Service and display the data in an external list in Sharepoint 2010. I am able to create a data source with success with the SOAP service, but how to display the data in the external list as external list uses only as data sources for external content types.

    Also with WCF as external content type, it is only on WCF services or any kind of web services can be added as an external content type.

    Any help would be appreciated.

    Thanks in advance

    Hello sunny198218,

    The question you have posted is related to Windows Communication Foundation Service and would be better suited in the MSDN forum for category Windows Communication Foundation. I've included a link to the forum where you can ask your question.
    http://social.msdn.Microsoft.com/forums/en-us/WCF/threads

    Sincerely,

    Marilyn

  • Need to install KB947821 update but fails and displays the error 9370001 code

    You will need to install KB947821 update but fails and displays the error code 9370001.  Does anyone have a solution?

    CrystalBall © SEZ...

    Free unlimited installation and compatibility support is available for Windows Vista, but only for Service Pack 2 (SP2). This support, initially planned to end on November 26, 2009, has been extended until February 26, 2010. Availability of support chat or messaging differs depending on your location. Some questions may require that more support for which he is advanced a charge.  Go to http://support.microsoft.com/oas/default.aspx?prid=13014&gprid=582034 & select appropriate category (i.e., download problem;) Installation problem; Problems after installing a service pack).

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • I want to restore switch between windows and display the desktop icon

    a few days before these two icons was actually on the task bar and now I have deleted how restore it back
    (switch between windows and display the desktop icon)

    Hello

    Copy the new:

    C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch

    To your user account to:

    C:\Users\launch of \AppData\Roaming\Microsoft\Internet Explorer\Quick

    Good luck, Rick Rogers, aka "Crazy" - Microsoft MVP http://mvp.support.microsoft.com Windows help - www.rickrogers.org

  • When I plug my portable hard drive to the usb port it does not read and display the contents...

    When I plug my portable hard drive to the usb port it does not read and display the contents...

    Hi deaza,.

    Ø Have you connected the USB hard drive to the computer directly or you have used an external USB hub to connect?

    O trying to connect to another USB port to check if it works?

    O the hardrive shows in windows of the computer when you connect it?

    Method 1:
    If you have installed security software, I suggest you to temporarily disable the security software and connect the USB and check to see if the same problem happens. Make sure that you enable the security software after checking.

    Alternatively, you can try to plug the USB key into a different USB port and check if it helps.

    Method 2:
    I suggest trying to launch hardware and troubleshooting of devices and check to see if it helps, here is the link:http://windows.microsoft.com/en-US/windows7/What-to-do-when-a-device-isn ' t-installed-correctly

    Method 3:
    If this does not help, then follow these steps:

    (a) remove all your USB devices. Use the safely remove the feature to turn them off.

    (b) open Device Manager and navigate to the section for USB. Uninstall all USB drives. There should be one for each USB port, and then restart.

    To open Device Manager, go to the link below and follow the steps:

    http://Windows.Microsoft.com/en-us/Windows7/open-Device-Manager

    (c) Windows should re - find all of the devices. If it is not the case, note the error message and let us know.

    You can also navigate to the link below and follow the steps to install the USB device.

    http://Windows.Microsoft.com/en-us/Windows7/install-a-USB-device

    I hope this helps. Let us know the results.

    Thank you and best regards,

    Srinivas R

    Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. The other rows are based on the entities

    Hi Experts,

    JDeveloper 12.1.3.0.0

    I have a VO based on entity object. With a column of the VO is transient attribute (I created).

    I need to call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. As well as other attributes.

    So can anyone suggest how can I achieve this?

    Thank you

    AR

    I think that you need a stored function (which returns the value) in this case, is not?

    Take a look at:

    https://docs.Oracle.com/CD/B31017_01/Web.1013/b25947/bcadvgen005.htm

    and search for:

    Invoking stored function with only Arguments in

    call your function in the Get attribute and return value accessor...

  • Hi, I want to know how to extract and save the text highlighted on Acrobat Reader.

    Hi, I want to know how to extract and save the text highlighted on Acrobat Reader.

    Hi Eli Marto,

    I'm sorry, but it is not possible to extract text from a PDF file using the player.

    It can be done using Adobe Acrobat.

    Ref: export the comments AND highlighted text?

    Kind regards

    Ana Maria

Maybe you are looking for

  • loss of internet explorer. Now by default Desktop Icons in Windows Media

    I HIT SOMETHING BY MISTAKE AND LOSS OF THE USE OF INTERNET EXPLORER AND WINDOWS MEDIA HAS TAKEN OVER MOST OF MY ICONS ON MY DESKTOPEVERYTHING THAT I TOUCHED WINDOWS MEDIA APPEARS, EVEN BASED ON MICROSOFT. WHAT SHOULD I DO TO GET IT BACK?

  • Video recording VHS on DVD

    I purchest a new Dell Studio computer Vista last week and I would like to put my video I have on cassettes VHS on DVD, what do I need and how do I connect it?

  • There are no photos or videos in C; / users/Karen/photos

    When I use Photos for my screensaver; I get a black screen with this message: there are no photos or videos in C; / users/Karen/photos

  • W550s $ 2 200 came installed by malware

    So Lenovo, I buy a machine from you guys (a little over $2,000 value), and the guys meet with FrReminder bloat ware? It is software that will keep harassing you even if you check "don't show this message." It's also a software that (according to the

  • SRP547W with Hello

    Hello I've recently updated our network using the SRP547W and since the upgrade, no Hello services working on Macs, airports and iPhones that run on the network before. All devices to connect wireless and are all on the same vlan. I saw this thread t