How to loop through a single row of data?

What I'm trying to do is use a cursor to loop through a clob. When I create my cursor I get the an error telling me that the table does not exist. Which implies that I have an implicit cursor. Is there a way to get around this?

> How to loop through a single row of data?
By not looping as there is only a single row?
> What I'm trying to do is use a cursor to loop through a clob
Processing (looping through) a CLOB has nothing to do with a cursor.
> When I create my cursor I get the an error telling me that the table does
not exist. Which implies that I have an implicit cursor.
Incorrect. It simply means that
a) you do not have permissions to access that table from within the current context
b) it does not exist (e.g. you have misspelled the object name, you have not qualified it properly within the current scope, etc)

Similar Messages

  • How to loop through classic report rows?

    Hi,
    I have a page that has a classic report region. Can I somehow loop through the rows in the report result?
    If I put a checkbox item in the query then using this works fine, but I would not like to add checkbox I just would like to loop through the records.
    FOR I in 1..APEX_APPLICATION.G_F02.COUNT LOOP
    Do something with record having  checkbox item value APEX_APPLICATION.G_F02(i);
    END LOOP;
    TIA,
    Tamas

    Andy,
    What I would like to do is to let the user click a report row, then navigate to a detail form page and display detailed information of the given report row. And should the suer decide to have a look at all the records, then let him/her click a next button on the detail form and display the next row in the report result on the detail form.
    Thanks for the tip. if there is no other way, I will probably do this way.
    Tamas

  • In Table Control How to get only a single row .

    Hi
    In Table Control How to get only a single row .I am able to decrease it its height to 4 but then 2 rows is getting dsplayed .I want only one row to be display and 2nd row should be deactivated or not visible.
    regards
    Avik
    Edited by: Julius Bussche on Jan 30, 2009 1:10 PM
    Removed friendly greeting from the subject title

    Hi Avik
    use this code it will help you.
    MODULE passdata OUTPUT.
      READ TABLE it_revision INTO wa_rev INDEX tab_clc-current_line.
      IF sy-subrc = 0.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.      " 111 IS THE GROUP NAME
            screen-input = 1.          " input mode
            screen-active = 1.         " input mode.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 = '111'.       "GROUP NAME
            screen-input = 0.           " display mode
            screen-active = 1.          " DISPLAY MODE.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDMODULE.                 " PASSDATA  OUTPUT
    Make sure in group tou are passing the field name that you want in input mode on the base of other field
    Hope it will help you.
    Thanks
    Arun Kayal.

  • How to loop through Multiple Excel sheets and load them into a SQL Table?

    Hi ,
    I am having 1 excel sheet with 3 worksheet.
    I have configured using For each loop container and ADO.net rowset enumerator.
    Every thing is fine, but after running my package I am getting below error
    [Excel Source [1]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009.  There may
    be error messages posted before this with more information on why the AcquireConnection method call failed.
    Warning: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED.  The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified
    in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
    [Connection manager "Excel Connection Manager"] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft Access Database Engine"  Hresult: 0x80004005  Description: "The Microsoft Access database engine cannot open or write to the file ''. It is already opened exclusively by
    another user, or you need permission to view and write its data.".
    Pleas suggest me the correct way of solving above issues.
    Thanks in advance :)
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

    Hi ,
    Please refer the below link for Looping multiple worksheet in a single SQL Table.
    http://www.singhvikash.in/2012/11/ssis-how-to-loop-through-multiple-excel.html
    Note:-If you using excel 2010 then you have to use EXCEL 12.0 .
    Above link explaining  step by step of Looping multiple worksheet in a single SQL Table.
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

  • Loop through table's rows

    Hi folks,
    I have a table with multiple rows which each one of them contains one dropdown list.
    In my code I want to loop through this table rows and check each dropdown list's selected-item.
    How can I do this in code(JavaScript).
    Thank you,
    Yair

    Check this thread,
    it has solutions for JavaScript ind FormCalc.
    http://forums.adobe.com/message/3345384#3345384

  • How to update a single row of data table

    How we can update a single row of the data table by clicking the button in the same row.
    Thanks in Advance.

    Hi!
    What do You mean 'update'? Get fresh data from DB or change data and commit it in DB?
    If commit, try to read here:
    http://developers.sun.com/jscreator/learning/tutorials/2/inserts_updates_deletes.html
    Thanks,
    Roman.

  • How to loop through a collection of records which is return value of func.

    Hi all.
    Have this situation:
    - Stored function (member of pkg procedure) that returns a collection of records.
    Package Spec:
    =========
    type tipo_pvt is table of s08_plan_venta_totalizado_r % rowtype;
    rc_pvt tipo_pvt;
    (s08_plan_venta_totalizado_r is a view).
    Package Body:
    =========
    select col1
    ,col2
    ,etc
    bulk collect into rc_pvt
    from s08_lista_precio_producto_r lpp
    ,s03_producto_r prd
    where condition;
    return rc_pvt;
    Once collection is loaded and returned (i know it loads records). I just want to loop through every record on a pl/sql procedure on the client (forms6i procedure), but it gives me the error: ORA-06531 Reference to uninitialized collection:
    On the forms6i client procedure i have something like:
    procedure p_carga_plan_venta_inv (p_id_plan_venta in number) is
    v_contador integer;
    v_mensaje varchar2(10);
    rc_pvt sk08_gestiona_plan_venta.tipo_pvt; (sk08_gestiona_plan_venta is package name)
    begin
         rc_pvt := sk08_gestiona_plan_venta.tipo_pvt();
         rc_pvt := sk08_gestiona_plan_venta.f_genera_plan_venta_inv (:pvv.lip_id_lista_precio
    ,:pvv.ems_id_sucursal
                                            ,:control4.v_metodo_calculo
    ,:pvv.unm_co_unidad_monetaria
    ,:pvp.fe_fin_periodo) ;
    -- previous statement dos not fail BUT THIS:
    message('rc_pvt.count= '||rc_pvt.count);pause;
    DOES FAIL
    end;
    So my question is : since i have already returned the collection, how come is not initialized....?
    Do i have to extend it first? In this case i have to return the number of records in the collection.....
    Look what happen when done from sqlplus:
    declare
    rc_pvt sk08_gestiona_plan_venta.tipo_pvt;
    begin
    rc_pvt := sk08_gestiona_plan_venta.tipo_pvt();
    rc_pvt :=
    sk08_gestiona_plan_venta.f_genera_plan_venta_inv (8713171
    ,null
    ,'m'
    ,'BS.F'
    ,to_date('28/02/2001','dd/mm/yyyy'));
    end;
    SQL> /
    Registros en la coleccion =6
    Procedimiento PL/SQL finalizado con éxito.
    SQL>
    I put a dbms_output.put_line on stored function .....
    Please help ....!
    Apparently it fails when calling the stored function:
    rc_pvt := sk08_gestiona_plan_venta.f_genera_plan_venta_inv (:pvv.lip_id_lista_precio
    ,:pvv.ems_id_sucursal
    ,:control4.v_metodo_calculo
    ,:pvv.unm_co_unidad_monetaria
    ,:pvp.fe_fin_periodo) ;
    I don't undestand since this function return the appropiate type. It seems the collection is empty, although having test that on sqlplus works ...
    rc_pvt := sk08_gestiona_plan_venta.f_genera_plan_venta_inv (:pvv.lip_id_lista_precio
    ,:pvv.ems_id_sucursal
    ,:control4.v_metodo_calculo
    ,:pvv.unm_co_unidad_monetaria
    ,:pvp.fe_fin_periodo) ;
    function f_genera_plan_venta_inv (p_id_lista_precio in number
    ,p_id_sucursal in number
    ,p_tipo_nivel_inv in varchar2
    ,p_co_unidad_monetaria in varchar2
    ,p_fe_fin_periodo in date) return tipo_pvt;
    for some reason it works on plus:
    SQL> declare
    2 rc_pvt sk08_gestiona_plan_venta.tipo_pvt;
    3 begin
    4 rc_pvt := sk08_gestiona_plan_venta.tipo_pvt();
    5 rc_pvt :=
    6 sk08_gestiona_plan_venta.f_genera_plan_venta_inv (8713171
    7 ,null
    8 ,'m'
    9 ,'BS.F'
    10 ,to_date('28/02/2001','dd/mm/yyyy'));
    11 --
    12 dbms_output.put_line('Registros en la coleccion = '||rc_pvt.count);
    13 for i in 1 .. rc_pvt.count loop
    14 --
    15 dbms_output.put_line('En '||i||rc_pvt(i).prd_co_producto);
    16 end loop;
    17 end;
    18 /
    Registros en la coleccion =6
    Registros en la coleccion = 6
    En 1PT.REF.PET.KO05
    En 2PT.REF.PET.LM15
    En 3PT.ALM.VDR.001
    En 4PT.REF.GRN.CN
    En 5PT.REF.GRN.KO
    En 6PT.REF.GRN.LM
    Procedimiento PL/SQL finalizado con éxito.
    Don't understand why it works on plus8 (same version that comes with 6i).
    Can't loop through records on forms...? WHY ...?
    Edited by: myluism on 02-abr-2012 14:40

    Forms 6i is an antique ... write your code to run on the server.
    Multiple examples of how to loop through an array loaded with bulk collect can be found here.
    http://www.morganslibrary.org/reference/array_processing.html
    The main library page is:
    http://www.morganslibrary.org/library.html

  • How To Access PAGE ITEM (single row) from HTML source

    Hi Guys,
    I have a page Item that return a string.
    I would like to show this string
    How To Access PAGE ITEM (single row) from HTML source?
    My desire final output is
    <marquee>:P1_PAGE_ITEM</marquee>
    Can please help me
    Thanks

    Hi,
    You can refer the page items in your page header as &itemname. For example, if I have page item P15_TEST, I will add the following in header:
    <marquee>
       &P15_TEST.
    </marquee>But make sure that you have a process before header to populate the value in your page item. Otherwise, there will be a null scrolling (which you can't see!) :)
    Regards,
    Zahid

  • How To Loop Through GregorianCalendar ?

    I wonder if anyone knows how to loop through GregorianCalendar , such as :
    GregorianCalendar Start_Date,End_Date;
    Start_Date=new GregorianCalendar(2000,Calendar.DECEMBER,25);
    End_Date=new GregorianCalendar(2006,Calendar.DECEMBER,25);
    for ( GregorianCalendar Day_Index=Start_Date ; Day_Index<End_Date ; Day_Index++ )
    Thanks
    Frank

    for ( GregorianCalendar Day_Index=Start_Date ;
    Day_Index<End_Date ; Day_Index++ )
    Day_Index.add(Calendar.DATE, 1);

  • How to Loop through App and finding popup Windows

    Does anyone know how to loop through the app and find any
    popup windows..

    I guess application by default creates a SystemManager
    object... So i used
    this.systemManager.popUpChildren.numChildren and it gives me
    0 all the time.. even though I have instances of windows to the
    app.. According to the documentation this should give you the
    number of popup children but it doesn't.. Any more ideas?

  • How to loop through an associative array

    Guys,
    How to loop through an associative array. where the key is string but the value is an object
    -Thanks

    It depends if you are using a Java HashMap or a BPM Associative array. You'd use the "keySet" if for the former and the "keys" if it's the latter.
    I know you want an object for the array, but Any[String] is used here just so you can see something coming back in the display statements shown below. Remove the input and display statements - they're just in there so you can see something working.
    Here's how to go through a Hashmap's array using a loop:
    map as Java.Util.HashMap
    map.put(1, "One")
    map.put(2, "Two")
    map.put(3, "Three")
    map.put(4, "Four")
    map.put(5, "Five")
    display map.keySet
    for each item in keySet(map) do
         display item
         display get(map, arg1 : item)
    endHere's how to go through an associative array using a loop:
    hashMap as Any[String]
    hashMap = ["One": 1,"Two":2]
    for each item in hashMap.keys do
         display item
         display "Item in the array is: " + hashMap[item]
    endDan

  • How to loop through a KM Folder ?

    Hi ....can someone please let me know how  to loop through a KM Folder having many documents , files etc .
    Waiting for replies !!
    Regards
    Smita

    Hi Smita
    Here is the code:
    String rLocationtest = "/documents/Folder1";
    IResourceContext c = ResourceFactory.getInstance().getServiceContext("cmadmin_service");
    ICollection collection = (ICollection)ResourceFactory.getInstance().getResource(RID.getRID(rLocationtest),c);
    loopFolder(collection,c);
    public void loopFolder(ICollection collection, IResourceContext c){      
             try{
             IResourceList resList = collection.getChildren();
         IResourceListIterator resItr = resList.listIterator();
                 while(resItr.hasNext()){
              IResource restemp = resItr.next();
              if(restemp.isCollection() && LinkType.NONE.equals(restemp.getLinkType())){     
                             loopFolder((ICollection)restemp,c);
                                    //If the restemp is not a collection, it is a resource.
                                    //Do the resource related operations here.
         }// End of while
             }catch(Exception e){
                  e.printStackTrace();
        }//End of loopFolder
    Hope it helps
    Thanks
    Deepak

  • Multiple clobs in a single row of data

    I have several clobs in a single row of data and have created a procedure where I attempt to display the first 4k of each clob.
    using a for loop cursor I select all of the clobs in a row at the same time and then I use dbms_lob.read to get the first 4k of data.
    For the first lob of each row everything works fine but when I attempt to dbms_lob.read the second one I get an "ORA-06502: PL/SQL: numeric or value error: invalid LOB locator specified: ORA-22275" and I'm not sure why?
    does anyone know of an example where two or more clobs are selected and then converted to 4K varchars?
    sample columns for the table:
    SPECIALREQUIREMENTSS     CLOB
    REFERENCERANGE     CLOB
    ALERTVALUE     CLOB
    REFERENCELAB     VARCHAR2(50 CHAR)
    TESTINCLUDES     CLOB
    LASTUPDATE     DATE
    sample code (I removed some code for clairity - this produces the same error):
    create or replace
    procedure test_lobs as
    v_lab_blob blob;
    v_lobamt binary_integer := 32767;
    v_lobpos pls_integer := 1;
    v_labrec labman.lab_testingdata%rowtype;
    v_buffer varchar2(32767) :='';
    v_start_left number;
    begin
    -- *** housekeeping
    dbms_lob.createtemporary(v_labrec.testincludes,TRUE);
    dbms_lob.createtemporary(v_labrec.specialrequirementss,TRUE);
    Plpdf.init;
    Plpdf.NewPage;
    Plpdf.SetColor4Drawing(66,66,66);
    Plpdf.SetColor4Filling(180,180,180);
    v_start_left := Plpdf.GetPageWidth-Plpdf.GetPageRightSpace;
    -- *** select the test name for shaded printing
    for x in (select indexnumber, test from labman.lab_testingdata where test like 'A%') loop
    -- *** select the test data for printing
    select * into v_labrec from labman.lab_testingdata where indexnumber = x.indexnumber;
    -- *** test includes
    if dbms_lob.getlength(v_labrec.testincludes) > 0 or v_labrec.testincludes is not null then
    Plpdf.SetPrintFont('Arial','B',8);
    Plpdf.LineBreak(.1);
    Plpdf.PrintCell(25,5,'Test Includes:',0,0,'R',0,null,0);
    Plpdf.SetPrintFont('Arial',null,8);
    if dbms_lob.getlength(v_labrec.testincludes) > 32767 then
    v_buffer := '*** error - text is greater than 32k ***';
    else
    v_lobamt := 32767;
    v_buffer := '';
    dbms_lob.read(v_labrec.testincludes,v_lobamt,v_lobpos,v_buffer);
    end if;
    Plpdf.SetLeftMargin(Plpdf.GetCurrentX);
    Plpdf.PrintFlowingText(5,v_buffer,null,0);
    Plpdf.SetLeftMargin(v_start_left);
    Plpdf.lineBreak;
    end if;
    -- *** special requirements
    Plpdf.SetPrintFont('Arial','B',8);
    Plpdf.LineBreak(.1);
    Plpdf.PrintCell(25,5,'Special Requirements:',0,0,'R',0,null,0);
    Plpdf.SetPrintFont('Arial',null,8);
    if dbms_lob.getlength(v_labrec.specialrequirementss) > 32767 then
    v_buffer := '*** error - text is greater than 32k ***';
    elsif dbms_lob.getlength(v_labrec.specialrequirementss) = 0 then
    v_buffer := '';
    else
    v_lobamt := 32767;
    v_buffer := '';
    dbms_lob.read(v_labrec.specialrequirementss,v_lobamt,v_lobpos,v_buffer);
    end if;
    Plpdf.SetLeftMargin(Plpdf.GetCurrentX);
    Plpdf.PrintFlowingText(5,v_buffer,null,0);
    Plpdf.SetLeftMargin(v_start_left);
    Plpdf.lineBreak;
    commit;
    end loop;
    Plpdf.SendDoc(v_lab_blob);
    -- store the PDF document
    delete from store_blob;
    commit;
    INSERT INTO STORE_BLOB (blob_file, created_date)
    VALUES (v_lab_blob, SYSDATE);
    COMMIT;
    end test_lobs;

    didn't think that checking for a length of zero and null would produce two different results - should have known better.
    Thanks for your help!
    elsif dbms_lob.getlength(v_labrec.specialrequirementss) = 0
    or v_labrec.specialrequirementss is null then

  • Loop through all items in all data blocks?

    Is there a way to loop through every item in every data block and set the property of a format mask?

    I do not know what error it is, only that an on-error trigger fires.
    I found out one thing I was definitely doing wrong, using nextblock, nextitem properties at the wrong level.
    DECLARE
         v_firstblock VARCHAR2(50);
         v_currentblock VARCHAR2(50);
         v_firstitem VARCHAR2(50);
         v_currentitem VARCHAR2(50);
         v_counter NUMBER :=0;
         v_counter2 NUMBER :=0;
    begin
       v_firstblock := get_form_property(:System.Current_Form,first_block);
       v_currentblock:= get_block_property(v_firstblock,nextblock);
       MESSAGE(v_firstblock||v_currentblock);
         LOOP
              v_counter := v_counter +1;
              IF (v_counter >10) THEN
                   exit;
              END IF;
              IF (v_currentblock = v_firstblock) THEN
                             exit;
           ELSE
                   v_firstitem :=  get_block_property(v_firstblock,first_item);
                        IF (lower(GET_ITEM_PROPERTY(v_firstitem,format_mask))=lower('mm-dd-yyyy')) THEN
                                       SET_ITEM_PROPERTY(v_firstitem,format_mask,'DD-MON-YYYY');
                        END IF;
                   v_currentitem :=  get_block_property(v_firstblock,first_item);
                   v_currentblock:= get_block_property(v_currentblock,nextblock);
                   GO_BLOCK(v_currentblock);
                        LOOP
                             v_counter2 := v_counter2 +1;
                             IF (v_counter2>15) THEN
                                  exit;
                             END IF;
                             v_currentitem:= get_item_property(v_currentitem,nextitem);
                             MESSAGE(v_counter||v_firstblock||v_currentblock||v_firstitem||v_currentitem||v_counter2);
                             IF (v_currentitem <> v_firstitem) THEN
                                  IF (lower(GET_ITEM_PROPERTY(v_currentitem,format_mask))=lower('mm-dd-yyyy')) THEN
                                       SET_ITEM_PROPERTY(v_currentitem,format_mask,'DD-MON-YYYY');
                                  END IF;
                             ELSE
                                  exit;
                             END IF;
                        END LOOP;
               END IF;
      END LOOP;
         end;Here is updated new code. I am currently trying to debug it, it has crashed my form on the server when tied to a button press.
    EDIT: So far I have found that it infinitely loops through the first 3 items and a null item in the first block. Still looking into why...
    EDIT: Some code changes to temporarily stop infinite loop and make v_currentblock actually change. Still loops through same 3 items in the first data block even though v_currentblock changes.
    Edited by: 878576 on Oct 21, 2011 12:46 PM

  • How to loop through xml records from file without ROW , /ROW tags?

    I am using dbms_XMLSave.insertXML procedure to insert xml formated record from file. MY xmlformated records does not have open and close ROW tags. I have multiple records in the file.How can I loop through without <ROW>,</ROW> tags?

    I am using dbms_XMLSave.insertXML procedure to insert xml formated record from file. MY xmlformated records does not have open and close ROW tags. I have multiple records in the file.How can I loop through without <ROW>,</ROW> tags?

Maybe you are looking for

  • Report/Form Please help

    Hi All, I need to know if there is a way to show a report with values from multiple tables that links to one form. I have limited experience and need the help. I have a table (table3 "ProCon") that links two separate tables (table1 "Project" and tabl

  • Oracle XE (windows) on drive other than C:\

    Hi, I have loaded XE on a windows 2008 server. I was restricted to installing it on the N: drive. Install went fine, and everything seems to be working. However i run XE as part of an automated build job. The job causes an XE problem (something like

  • Item billing plan lines not appearing in billing due list ...

    Hello Team , I have one question on service contract billing plan. Contract has status released. I have one contract which has header billing plan that is applicable at line item also. 1. At line item level billing plan two items are due for billing

  • MKV files suddenly don't play ?

    When I first received my phone I was able to play MKV files with no problem. I don't know what could have changed since then but now when I try I get sound but no picture ?? Has anyone any ideas, the same files work absolutely fine on my computer.

  • T.CODE 'F110'

    Hi, I want to know if i can make partial payment on transaction 'F110' Thanks.