Convert number to Varchar for printing the Type of table in a loop error: PLS-00306:

Hello

I am trying to print a number of the Table that I get from a ref cursor But cannot convert the number to Varchar to print. What I'm doing wrong here

Thank you

Ken

OUT_REFCURSOR FETCH BULK COLLECT INTO theTBL_RCRD_ID ;

So THAT (theTBL_RCRD_ID IS NOT NULL)

LOOP

strRCRDID: = TO_CHAR (onTBL_RCRD_ID (indx), "99999");    -This line throws error message

dbms_output.put_line (strRCRDID);

INDX: = indx + 1;

END LOOP;

  • Error: PLS-00306: wrong number or types of arguments in the call to "TO_CHAR.

Try this...

strRCRDID: = TO_CHAR (outTBL_RCRD_ID (indx). RCRD_ID, "99999");

Tags: Database

Similar Questions

  • Converting Images to CMYK for Print Publication

    When in my workflow should I be converting images to CMYK for print publication?

    Currently, I shoot FIRST pictures with my SLR in Adobe RGB, import images into Photoshop for manipulating and then convert the final image, the size to CMYK before placing it in my Indesign document. Before you go to print, I convert my PDF files using the [PDF / X - 1a: 2001] preset. I use a system that is balanced with a profile for my monitor.

    As many of my photos have shades of green, I am often disappointed by the conversion to CMYK because lose I the saturation and brightness. I'm doing something wrong? Is there a better way to preserve the quality of the color in my images when you go to a printer?

    Never. Leave it as RGB.

    All modern printers should happily accept RGB images. PDF/X-4 is the modern

    standard. X-1a can be described as archaic.

  • Please help solve the problem error: PLS-00306: wrong number or types of a

    Hello

    Please see my statement of types and the procedure. Object and the nested table that is declared at the schema level

    I'm using the oracle version 11.2
    CREATE OR REPLACE TYPE T_COPY_EVNT_DTL IS OBJECT
    
    ( 
    
    eventId varchar2(100),
    
    eventDescription varchar2(100),
    
    promoMonthDescription varchar2(100),
    
    promoStartDate varchar2(100),
    
    promoEndDate varchar2(100),
    
    PROMOCOSTSTARTDATE varchar2(100)
    
    );
    
    
    CREATE OR REPLACE TYPE T_EVENT_TABLE IS TABLE OF T_COPY_EVNT_DTL;
    
    create or replace PROCEDURE Pr_Event_Details_new(ip_xml          CLOB,
                                                                                                                                                     op_sections_xml OUT XMLTYPE) AS
         
         event_list     t_copy_evnt_dtl;
         event_data_sec t_event_table := t_event_table();
         
         
         CURSOR get_event_cur IS
              SELECT cast(collect(t_copy_evnt_dtl(evnt.event,                                                                                                                    evnt.event_desc,
                        mth.promo_month_desc,
                        TO_CHAR(evnt.start_date,
                        'DD/MM/YYYY'),
                        TO_CHAR(evnt.end_date,
                        'DD/MM/YYYY'),
                        TO_CHAR((evnt.start_date - 21),
                        'DD/MM/YYYY'))) as
                        t_event_table)
                   FROM RETEK_PROMO_EVENT_MST evnt
               INNER JOIN  .....
               WHERE ... 
               ORDER BY evnt.event_desc,
                                       mth.promo_month_desc,
                                       dtl.promo_start_date,
                                       dtl.promo_end_date,
                                       dtl.promo_cost_start_date;
    
         type get_event_tab is table of get_event_cur%rowtype index by Binary_Integer;
         l_get_event_tab get_event_tab;
    BEGIN
    
         ....
         
         
              OPEN get_event_cur;
              fetch get_event_cur
                   into event_data_sec;
         
              event_data_sec := set(event_data_sec);
              ...
              
              
              
    EXCEPTION
              --log_errors...                                                                 
              Raise;
    END Pr_Event_Details_new;
    Error: PLS-00306: wrong number or types of arguments in the call to 'SET '.
    Online: 117
    Text: event_data_sec: = set (event_data_sec);

    Error: PL/SQL: statement ignored
    Online: 117
    Text: event_data_sec: = set (event_data_sec);

    You will raise a wrong number or types of argument error, or an exception of PLS-00306, if you use the fixed operator with the collection of user-defined object types.

    The collection must contain SQL scalar data types - single values without internal components...

    Numeric values, on which you can perform arithmetic operations.
    Alphanumeric values that represent individual or strings of characters, characters that you can manipulate.
    Logical values, on which you can perform logical operations.
    Dates and times, you can manipulate.
    Time intervals, you can handle.

    Published by: stefan nebesnak on January 24, 2013 13:22

  • Number of days for all the months of the previous 10 years

    Hi guys,.
    I wonder if there is a way to insert in my table of data for the period dimension all
    days for the months of the year 2004,2005,2006,2007, etc..
    Is there somewhere in the Oracle database that stored the number of days for all the months of the years?
    I think I woud have to use a loop of the GET something like the following:

    -The year month day
    2004 - 1-1
    2004 1-2
    2004 1-3
    2004 1-4
    2004 1-5
    2004 1-6
    etc.
    Assuming that there are 28 or 29 or 30 or 31 days the lines for January 2004 would be 28,29,30 or 31.
    I need it for all the months and years.
    Thank you
    metalray

    Hello

    The following SQL returns all the days from 01/01/1970 until today:
    + (Just modify the FRST to What You Need).

    with beginat as (
    select trunc(to_date('1970/01/01','yyyy/mm/dd')) frst from dual
    )
    select frst+(level-1) as daydt
    from beginat
    connect by level <= ceil(sysdate-frst);
    

    With a previous alter session set nls_date_format = "dd/mm/yyyy hh24:mi:ss" result would be:

    DAYDT
    -------------------
    01/01/1970 00:00:00
    02/01/1970 00:00:00
    03/01/1970 00:00:00
    04/01/1970 00:00:00
    05/01/1970 00:00:00
    06/01/1970 00:00:00
    (...)
    09/01/2011 00:00:00
    10/01/2011 00:00:00
    11/01/2011 00:00:00
    
    14986 rows selected.
    

    In fact, the real question is: Why do you need them?
    (^_^)

    Published by: Nicosa January 11, 2011 14:25
    (for the correction)

  • loops for each: the type of the variable

    I see warning in the editor telling me that the type of the variables in my curls foreach was not specified. I use an XMLList type (such as the collection) and I can not understand what should be the type of each element.
    Here is a sample of my code.

    var xmlList:XMLList = xmlDoc.dataTable [0] .dataRow;
    for each {(var xmlList)
    }

    So what is the type of the variable "item" supposed to be? I tried the XMLNode, but it isn't like that. The debugger shows me the 'node', but does not show the type.

    Shiv


    Never mind. I realized that it should be of XML type.

  • Curl call to start the workflow with the Type of table / Composite

    Hello I'm trying to start a workflow with an array type / Composite.

    I'm using curl to make the call and post fields look like this when you send just a string:

    {

    "settings":

    [

    {

    'value ':

    {

    "chain": {"value": "test"}

    },

    "type": "string",.

    "name':"vm. "

    "scope": "local".

    }

    ]

    }

    How would he format if I had a type of table / Composite?

    The composite type has the format of the Type / size and String / number

    Well, I don't know like what your workflow, but here is what looks like my quick test workflow:

    MESSAGE: https://YOUR-VCO-SERVER;8281/vco/api/workflows/475a3967-2c29-4140-a63f-ec1822ec330b/executions/

    Headers:

    Content-Type: application/json

    Accept: application/json

    And here is the json work to get into the body:

    {
        "parameters": [
            {
                "value": {
                    "array": {
                        "elements": [
                            {
                                "composite": {
                                    "type": "CompositeType(Type:string,size:number):drives",
                                    "property": [
                                        {
                                            "id": "Type",
                                            "value": {
                                                "string": {
                                                    "value": "NTFS"
                                                }
                                            }
                                        },
                                        {
                                            "id": "size",
                                            "value": {
                                                "number": {
                                                    "value": 20
                                                }
                                            }
                                        }
                                    ]
                                }
                            },
                            {
                                "composite": {
                                    "type": "CompositeType(Type:string,size:number):drives",
                                    "property": [
                                        {
                                            "id": "Type",
                                            "value": {
                                                "string": {
                                                    "value": "ext3"
                                                }
                                            }
                                        },
                                        {
                                            "id": "size",
                                            "value": {
                                                "number": {
                                                    "value": 25
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                },
                "type": "Array/CompositeType(Type:string,size:number):drives",
                "name": "drives",
                "scope": "local"
            }
        ]
    }
    

    I've included the workflow here as well.

    Just a simple script:

    System.debug("Drives:");
    for each (drive in drives){
      System.debug("================");
      System.debug("Type: "+drive.Type);
      System.debug("Size: "+drive.size);
    }
    

    My results:

  • Error: PLS-00306: wrong number or types of arguments

    Hello

    I created a function:

    create or replace procedure AS Test11
    x Test.Emp_No%Type;
    Begin
    Select emp_no in x from Test whose name = 'South '.
    x: = x + 1;
    Update Test set emp_no = x where emp_no < 100;
    commit;
    end Test11;

    It has compiled with success in PL/SQL Developer. Now, I created an executable of this procedure in front-end - 11i. And then I created a program of this executable. Then I added this program to a group of application.

    Now that I run this query and I get this error in the log:

    Error ORACLE 6550 in FDPSTP

    Cause: FDPSTP failed due to the ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in the call to 'TEST11 '.
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    .

    Hello
    Whenever you save a function, or a PL/SQL procedure as a simultaneous program to apps, you must
    to add two parameters of type varchar2 (errbuf and retcode) Moreover to your settings.
    If you change procedure as follows:

    create or replace procedure Test11(errbuf   out varchar2,
                                       retcode out varchar2) AS
    x Test.Emp_No%Type;
    Begin
    select emp_no into x from Test where name = 'Sud';
    x := x + 1;
    update Test set emp_no = x where emp_no < 100;
    commit;
    end Test11;
    

    Published by: Anthony Alix on December 3, 2008 05:20

    Published by: Anthony Alix on December 3, 2008 05:25

    Published by: Anthony Alix on December 3, 2008 05:35

  • What is the difference between the type of table and view?

    Hello world.

    What is the difference between the type of view and table that we can set using SQL statement such as: "tab type is table of...» » ?

    A view is a stored query.

    An array type is a construction of PL/SQL.

    Both are documented:

    http://docs.Oracle.com/CD/E11882_01/server.112/e10897/schema.htm#ADMQS0841

    Management of schema objects

  • Add an attribute of the element configuration table type programmatically.  How can I specify the type of table?

    I am trying to add a configuration item that is an array of strings.  I don't know how to do this programmatically and have it show as an array of strings.  I would like people to be able to use the client of vCO and only change these if needed is.  I managed to add items, but they appear as "modified".  I can retrieve all ok by programming, but I guess since one can table actually waiting variant values is done deal as the generic object rather than an array of strings.  Is it possible to force this type when I put the value via the api?  It's my test code:

    var testArray = new Array();
    testArray.push ("string1");
    testArray.push ("string2");
    element.setAttributeWithKey ("TestKey", testArray);
    This translates into an attribute of type table, but I like it to be of type Array/string;

    Paul, as far as I know, you must manually set your attribute types using the vCO client. You cannot specify the types using script.

  • Print the Web page Table

    I develop in JDeveloper 11.1.1.6

    My request has currently 8 pages it contains. I want to provide functionality to print each page so that users can print data that are rendered on the screen. Each of my pages will display data in a read-only table.

    On each of these pages, I have a button that users can click. Each of the boxes to invoke a fileDownloadActionLister that calls a method in my grain of support to create a PDF report. The PDF report is sent to the browser and the user can do whatever they want with it. Which works very well.

    I have my button vision print something similar. Perhaps he could create the same report PDF and dialog rather than give the user the windows 'Save', I want to give to the window of dialogue 'Print' Windows. An alternative would be a function of ADF print the array returned within the page.

    Could you please advise on how I might be able to achieve this desired printing features.

    AF:showPrintablePageBehavior

    http://docs.Oracle.com/CD/E24001_01/apirefs.1111/e12419/tagdoc/af_showPrintablePageBehavior.html

    Arun-

  • Where to find the type of table table View ALL/DBA or SYS

    Oracle 10g.

    I searched the Oracle manuals and the web with nothing will do.

    I need to know in which ALL/DBA table view or SYS I find the type (Organization) of a table.
    ITO and 'normal' tables is easy, but I need exactly to know which tables are 'EXTERNAL '!
    Maybe I'm looking in the wrong place?

    ALL_ALL_TABLES has a column "table_type", but it appears in the form of external tables of ifor NULL.

    Also, I would try to avoid questioning the "SYS" tables directly.

    You can try user_external_tables or dba_external_tables.

  • Deliver the trigger, multi-table insert logging of errors

    I find that if I try to perform an insert multi-table with logging of errors on a table that has a trigger, then some violations of constraints result in a raised exception being as connected:
    < pre >
    SQL > select * from v version $;

    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    AMT for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

    SQL > create table t1 (primary key of all id ;)

    Table created.

    SQL > create table t2 (id integer, t1_id integer primary key,
    2 constraint t2_t1_fk foreign key (t1_id) refers to t1);

    Table created.

    SQL > exec dbms_errlog.create_error_log ("T2");

    PL/SQL procedure successfully completed.

    SQL > insert all
    2 in t2 (id, t1_id)
    3 values (x, y)
    4 errors in the journal in err$ _t2 limit unlimited rejection
    5. Select 1 x, 2 double y;

    0 rows created.

    SQL > create or replace trigger t2_trg
    2 before insert or update on t2
    3 for each line
    4 start
    5 zero;
    6 end;
    5 m

    Trigger created.

    SQL > insert all
    2 in t2 (id, t1_id)
    3 values (x, y)
    4 errors in the journal in err$ _t2 limit unlimited rejection
    5. Select 1 x, 2 double y;
    Insert all
    *
    ERROR on line 1:
    ORA-02291: integrity constraint (enhanced oil recovery. T2_T1_FK) violated - key parent not found
    < code >

    This does not seem to be a documented restriction. Anyone know if this is a bug?

    Hi Tony,.

    Looks like you ran into Bug 9539578: INSERT ALL AND TRIGGER CAUSES ERROR LOGGING to FAIL (ROLLBACK)

    Concerning
    Peter

  • My default size for printing the letter, but it retains the impression as if a parameter is set to 8X6.75. How can I fix it?

    Firefox has recently updated to 40.0.2. Just back from a week off the coast of the work to discover, it was the incorrect impression. The printer is said to add 8X6.75 paper to print. Firefox settings are defined on 11X8.5 and all other browsers are printing very well.

    If Firefox does not use the entire sheet of paper, it can result from after having extracted Windows incorrect paper size settings when reading data from the print driver. Compensation it may involve conclusions some mask parameters, but here goes:

    (1) in a new tab, type or paste Subject: config in the address bar and press ENTER. Click on the button promising to be careful.

    (2) in the search above the list box, type or paste print and make a pause so that the list is filtered

    (3) for each parameter of the problem printer, right click and reset The fastest way is to click with the mouse and press the r key on the keyboard with your other hand.

    Note: In a few other discussions involving printers Brother, printer_printer_name.print_paper_data preference has been set to 256 and when the user changed it to 1 that solved the problem of paper size. If you see a 256 here, you can change the value by double-clicking it or by using the right click > modify.

    Any improvement?

  • How to move the Cursor parameter for loop with the type of table?

    Hi friends,
    I wonder how to pass a parameter into the second loop in the code example below. Please see the "BOLD" statements and to answer my questions.
    Thank you very much. Here's the code.

    declare
    l_bom_header_tbl BOM_BO_PUB. BOM_HEADER_TBL_TYPE; -TABLE TYPE
    V_bom_header_tbl Bom_Bo_Pub.Bom_Head_Rec_Type: = Bom_Bo_Pub.G_MISS_BOM_HEADER_REC; -Record type
    v_bom_components_tbl Bom_Bo_Pub.Bom_Comps_Tbl_Type: = Bom_Bo_Pub.G_MISS_BOM_COMPONENT_TBL; - nested table type
    c: number = 0;
    k: = 1 number;
    Start
    BOMPXINQ. () Export_BOM
    P_org_hierarchy_name = > l_org_hierarchy_name,
    P_assembly_item_name = > l_assembly_item_name,
    P_organization_code = > l_organization_code,
    P_alternate_bm_designator = > '1Test. "
    P_Costs = > l_costs,
    P_Cost_type_id = > l_cost_type_id,
    X_bom_header_tbl = > l_bom_header_tbl,
    X_bom_revisions_tbl = > l_bom_revisions_tbl,
    X_bom_components_tbl = > l_bom_components_tbl,
    X_bom_ref_designators_tbl = > l_bom_ref_designators_tbl,
    X_bom_sub_components_tbl = > l_bom_sub_components_tbl,
    X_bom_comp_ops_tbl = > l_bom_comp_ops_tbl,
    X_Err_Msg = > l_Err_Msg,
    X_Error_Code = > l_Error_Code);
    If l_Error_Code = 0 then


    because me in 1... l_bom_header_tbl. COUNTING LOOP
    V_bom_header_tbl.organization_code: = "DSC";

    Can assign us a table type of guy like below the registration statement?
    V_bom_header_tbl.assembly_item_name: is l_bom_header_tbl (i) .assembly_item_name;.

    k: = 1;

    I want to pass the l_bom_header_tbl (i) .assembly_item_name parameter in the declaration below: How do I do this?
    for j from 1... l_bom_components_tbl. COUNTING LOOP

    Can assign us a table type of type array as below the statement?
    v_bom_components_tbl (k). Assembly_Item_name: is l_bom_header_tbl (i) .assembly_item_name;.
    k: = k + 1;
    end LOOP;
    end loop;
    end;

    Published by: ILovePlSql on March 22, 2010 07:51

    Published by: ILovePlSql on March 22, 2010 08:16

    ILovePlSql wrote:
    V_bom_header_tbl emp % rowtype;

    If v_bom_header_tbl has just two fields as ename, sal then also the assignment of type table, record type work or if the record type and the array type have the same structure?

    Yes:

    SQL> declare
      2      type Bom_Head_Rec_Type is record(ename emp.ename%type,sal emp.sal%type);
      3      type BOM_HEADER_TBL_TYPE is table of Bom_Head_Rec_Type index by binary_integer;
      4      l_bom_header_tbl BOM_HEADER_TBL_TYPE;
      5      V_bom_header_tbl emp%rowtype;
      6  begin
      7      select ename,sal bulk collect into l_bom_header_tbl from emp;
      8      for i in 1 .. l_bom_header_tbl.count loop
      9        V_bom_header_tbl.ename := l_bom_header_tbl(i).ename;
     10        V_bom_header_tbl.sal := l_bom_header_tbl(i).sal;
     11      end loop;
     12  end;
     13  /
    
    PL/SQL procedure successfully completed.
    
    SQL>  
    

    SY.

  • Cannot use varchar variable of the type of entry into the procedure.

    Hello

    I created as a simple procedure... its like this...

    SQL > CREATE OR REPLACE PROCEDURE
    2 input_columns
    (3)
    4 table_name IN user_tab_columns.table_name%TYPE,
    5 ignore_columns in VARCHAR2 (90)
    (6) IS
    stmt 7 VARCHAR2 (3000);
    BEGIN 8
    stmt 9: = "INSERT INTO ignore_columns VALUES ('|)" table_name | ',' | ignore_col
    option |') ' ;
    10
    11 EXECUTE IMMEDIATE stmt;
    12
    13 END;
    14.

    CAUTION: Procedure created with compilation errors.

    SQL > show errors;
    Errors in PROCEDURE INPUT_COLUMNS:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    5/27 PLS-00103: encountered the symbol "(" quand attend un de la) "
    Next:
    := . ), @ % of default characters
    The symbol ': = ' has been replaced by "("pour continuer.) "

    The ignore_columns of the table has been created.

    If I remove the size of the variable ignore_columns or if I define it as a number, the procedure is created successfully.

    When I'm not defining the size of the variable, I can't pass parameters for the ignore_columns column. Could you please help me.

    Thank you.

    Azeroth wrote:
    @Twinkle... it does not work

    SQL> create table ignore_columns
      2  (a varchar2(90),
      3  b varchar2(90));
    
    Table created.
    
    SQL> CREATE OR REPLACE PROCEDURE
      2   input_columns
      3   (
      4   table_name IN user_tab_columns.table_name%TYPE,
      5   column_list IN VARCHAR2
      6   ) IS
      7   stmt VARCHAR2(3000);
      8   BEGIN
      9   stmt := 'INSERT INTO ignore_columns VALUES (:1,:2)';
     10
     11   EXECUTE IMMEDIATE stmt using table_name,column_list;
     12
     13   END;
     14   /
    
    Procedure created.
    
    SQL> execute input_columns('HELL', 'HELLO');
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from ignore_columns;
    
    A
    -----------------------------------------------------------------------
    B
    -----------------------------------------------------------------------
    HELL
    HELLO
    

    Twinkle

Maybe you are looking for