Invalid number error while using apex_item.text_from_lov_query

When i try to create a simple apex_item.text_from_lov_query , i get following error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Code is :
SELECT apex_item.text_from_lov_query
(prj_id,
'select prj_desc,prj_id from prj',
NULL
) prjname
FROM projects
Why is it throwing this error?
M using Apex3.2 version.
any tutorial or link to read more about apex_items?
Edited by: tvp on Nov 22, 2010 7:28 AM
Edited by: tvp on Nov 22, 2010 7:29 AM
Edited by: tvp on Nov 22, 2010 10:41 AM

What is the column size of your prj_desc field in the prj table? If this is set too large that could be causing your error.

Similar Messages

  • Recieving ORA-01722 invalid number error while creating a materialized view

    Hi,
    I am receiving a ORA-01722 invalid number error while creating a materialized view. when run the select statement of the view i don't get any error, but when i use the same select statement to create a materialized view i receive this error. Could any please help in resolving this error. Here is the code i am using to create a materialized view.
    CREATE MATERIALIZED VIEW MV_EBS_CH_CLOSED
    REFRESH FORCE ON DEMAND
    AS
    SELECT DISTINCT kr.request_id, org.org_unit_name,
    ebs_ch_ticket_type (kr.request_id) ticket_type,
    DECODE
    (kr.status_code,
    'CLOSED_SUCCESS', kr.last_update_date,
    'IN_PROGRESS', (SELECT MAX (start_time)
    FROM ebs_ch_datastore ecd1
    WHERE kr.request_id = ecd1.request_id
    AND workflow_step_name =
    'Final BA Review and Deployment Exit Criteria')
    ) closed_date,
    substr(krhd.visible_parameter12,1,10) siebel_start_date,
    kr.creation_date itg_start_date
    FROM kcrt_requests kr,
    kcrt_request_types krt,
    kcrt_req_header_details krhd, kcrt_request_details krd1,
    (SELECT koum.user_id user_id,
    DECODE (koup.org_unit_name,
    'IT Implementations', 'CHS - Service Management BA',
    koup.org_unit_name
    ) org_unit_name
    FROM krsc_org_unit_members koum, krsc_org_units koup
    WHERE 1 = 1
    AND 'Y' = koup.enabled_flag
    AND koum.org_unit_id = koup.org_unit_id
    AND EXISTS (
    SELECT 'X'
    FROM krsc_org_units kouc
    WHERE koup.org_unit_id = kouc.org_unit_id
    START WITH kouc.parent_org_unit_id =
    ANY (SELECT org_unit_id
    FROM krsc_org_units krsc_org_units1
    WHERE 'Clearinghouse' =
    org_unit_name)
    CONNECT BY kouc.parent_org_unit_id =
    PRIOR kouc.org_unit_id)
    UNION
    SELECT kou.manager_id user_id,
    DECODE
    (kou.org_unit_name,
    'IT Implementations', 'CHS - Service Management BA',
    kou.org_unit_name
    ) org_unit_name
    FROM krsc_org_units kou
    WHERE 'Y' = kou.enabled_flag
    START WITH kou.parent_org_unit_id =
    (SELECT org_unit_id
    FROM krsc_org_units krsc_org_units2
    WHERE 'Clearinghouse' = org_unit_name)
    CONNECT BY kou.parent_org_unit_id = PRIOR kou.org_unit_id) org
    WHERE krt.request_type_id = kr.request_type_id
    AND krt.request_type_name IN ('Bug Fix', 'IT Enhancement')
    and kr.REQUEST_ID = krd1.request_id
    and krd1.batch_number = 1
    AND kr.request_id = krhd.request_id
    AND org.user_id in (krd1.parameter4, krd1.parameter5, krd1.parameter7)
    AND ( 'CLOSED_SUCCESS' = kr.status_code
    OR 'IN_PROGRESS' = kr.status_code
    AND kr.request_id IN (
    SELECT request_id
    FROM (SELECT DISTINCT request_id,
    MAX
    (start_time)
    closed_date
    FROM ebs_ch_datastore
    WHERE 'Final BA Review and Deployment Exit Criteria' =
    workflow_step_name
    GROUP BY request_id))
    Thanks,
    Shaik Mohiuddin

    This error occurs when you try to create a materialized view , but if you run the sql the results are perfectly fine. Well it happend to me also and to fix this I made sure all the coulmns have the same data type which are used in joins or in where clause.
    use
    where
    to_number(col1)=to_number(col2) and to_number(col3)=to_number(col4)
    hope this helps..

  • Invalid number error when using case when

    I have table called NATIONAL_RARE_ECOSYSTEMS which has 1 column called TEST_COLUMN (data type: varchar2):
    TEST_COLUMN
    rare ecosystem
    rare
    0
    0
    (null)
    (null)
    what I want is a query which will add a column called NRE_SCORE which will give each row instance a score of 0 if it null.
    If it is 0 then score should be 0.
    If the row contains any text then score should be 1
    I have written the query:
    SELECT
    (CASE WHEN test_column is null THEN 0
    WHEN test_column = 0 THEN 0
    WHEN test_column > 0 THEN 1
    END) AS NRE_SCORE
    FROM NATIONAL_RARE_ECOSYSTEMS;
    I get the error message:
    ORA-01722: invalid number
    01722. 00000 - "invalid number"
    I think this is because on the 2nd and 3rd line I'm trying to do arithmetic on a column which is varchar2 which I know I cant do.
    How do I write a query which says: if the row contains text then give score of 1?
    I'm using oracle 11g.

    Hi,
    993451 wrote:
    I have table called NATIONAL_RARE_ECOSYSTEMS which has 1 column called TEST_COLUMN (data type: varchar2):
    TEST_COLUMN
    rare ecosystem
    rare
    0
    0
    (null)
    (null)
    what I want is a query which will add a column called NRE_SCORE which will give each row instance a score of 0 if it null.
    If it is 0 then score should be 0.
    If the row contains any text then score should be 1Any text other than '0', you mean. I assume it doesn't matter if that text happens to be all digits, such as '9876', or something with no digits, such as 'rare'.
    I have written the query:
    SELECT
    (CASE WHEN test_column is null THEN 0
    WHEN test_column = 0 THEN 0
    WHEN test_column > 0 THEN 1
    END) AS NRE_SCORE
    FROM NATIONAL_RARE_ECOSYSTEMS;
    I get the error message:
    ORA-01722: invalid number
    01722. 00000 - "invalid number"
    I think this is because on the 2nd and 3rd line I'm trying to do arithmetic on a column which is varchar2 which I know I cant do.You're actually not doing any arithmetic, but you are comparing your VARCHAR2 column to a NUMBER, so it tries to convert the string to a NUMBER, and that's why you get the ORA-01722 error.
    >
    How do I write a query which says: if the row contains text then give score of 1?
    I'm using oracle 11g.Here's one way:
    SELECT       CASE
               WHEN  NVL (test_column, '0') = '0'
               THEN  0
               ELSE  1
           END          AS nre_score
    ,       ...          -- you must want other columns, too
    FROM       national_rare_ecosystems
    ;Since you don't really care about the numeric value, don't use NUMBERs anywhere; stick with VARCHAR2s, such as '0'.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
    Point out where the query above is getting the wrong results, and explain, using specific examples, how you get those results from the sample data in those palces.
    See the forum FAQ {message:id=9360002}

  • "ORA-1722 Invalid number" error while runing a SQL script in SQL*Plus

    Hello,
    I created a SQL script that is intended to populate tables with
    baseline data. When I run the script in the SQL*Plus program
    that comes with the Oracle 8.1.6 (client), I receive an "ORA-
    1722 Invalid number".
    The error always occurs when SQL*Plus tries to execute the
    following SQL statement:
    insert into components(db_ind,module_id,ext_compid,active) values
    ('cm',modules_seq.currval,1046682,'y');
    The datatypes for the columns on the components table are as
    follows:
    db_ind varchar2(2);
    module_id number;
    ext_compid number;
    active varchar2(1);
    It seems that for some reason Oracle is having trouble
    recognizing 1046682 as a number.
    I also tried the following INSERT statements to see if that
    would work:
    insert into components(db_ind,module_id,ext_compid,active) values
    ('cm',modules_seq.currval,to_number('1046682'),'y');
    insert into components(db_ind,module_id,ext_compid,active) values
    ('cm',modules_seq.currval,'1046682','y');
    but I still receive the same error message
    Is there some NLS setting(s) I need to modify so that Oracle
    does not give me this error? Does anyone know the answer to
    this problem?
    Your help is greatly appreciated.
    Oscar
    (NOTE: I also receive this same error when trying run the
    script in SQL Navigator and Toad programs)

    Please see the following docs.
    R12: JBO-27122 Error Message Clicking On Supplier Accounting Link With Unexpected Error [ID 1218903.1]
    Supplier Management Accounting Link Gives Unexpected Error and JBO-27122 at SELECT * FROM (select pvsa.ADDRESS_STYLE [ID 1340655.1]
    Adding Accounting Information or Operating Unit Information fails with APP-FND-1564: ORACLE error 1722 in FDFGVD [ID 364265.1]
    Thanks,
    Hussein

  • Invalid number error when using external table

    Hello.
    I have a problem with creating an external table with number field.
    My txt file looks like:
    11111|text text|03718
    22222|text text text|04208
    33333|text|04215
    I try to create external table like:
    create table table_ex (
    id varchar2(5),
    name varchar2(100),
    old_id number(5))
    organization external (Type oracle_loader default directory dir
    access parameters(
    RECORDS DELIMITED BY NEWLINE
    fields terminated by '|'
    (id, name, old_id))
    location ('file.txt'));
    When i create the table and run select i get this in log file:
    Field Definitions for table TABLE_EX
    Record format DELIMITED BY NEWLINE
    Data in file has same endianness as the platform
    Rows with all null fields are accepted
    Fields in Data Source:
    ID CHAR (255)
    Terminated by "|"
    Trim whitespace same as SQL Loader
    NAME CHAR (255)
    Terminated by "|"
    Trim whitespace same as SQL Loader
    OLD_ID CHAR (255)
    Terminated by "|"
    Trim whitespace same as SQL Loader
    error processing column OLD_ID in row 1 for datafile
    /dir/file.txt
    ORA-01722: invalid number
    Whats the problem?
    Any idea?
    Thanks
    Message was edited by:
    DejanH

    Try this:
    create table table_ex
    id varchar2(5),
    name varchar2(100),
    old_id number
    organization external
    (Type oracle_loader default directory dir access parameters
    ( RECORDS DELIMITED BY NEWLINE fields terminated by '|'
    (id CHAR(5),
    name CHAR(100),
    old_id CHAR(5)
    location ('file.txt')
    I have removed the length of Number field and added length in characters later
    Aalap Sharma :)
    Message was edited by:
    Aalap Sharma

  • Invalid number error while loading data thru ODI

    Hi John,
    I have a table as source whic has text as well as numeric data.The column type is varchar2. In on interface i have to load the positions which is textual data. For that i used a filter saying account='Postions' and it got loaded.
    In the second interface i used account!='Position' and for the data column used to_number function. But i got the following error
    Traceback (innermost last):
    File "<string>", line 20, in ?
    java.sql.SQLException: ORA-01722: invalid number

    Hi,
    This error means you are trying to convert a value to a number but the value is not numeric, e.g. if you tried to do to_number("ODI") it would fail because ODI is not numeric so can't be converted.
    Your SQL must be returning some non-numeric values, I would check the values between returned from the query.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Error while using APEX_ITEM.TEXTAREA()

    Hello All
    I am using Apex, quite a few days now, but had a problem with APEX_ITEM.TEXTAREA. When I input more than 2000 characters in my Textarea it is giving an error of 404 as follows:
    Not found
    The requested URL /apex/wwv_flow.accept was not found on this server
    I really didn't get where I am making a mistake. This text area input is a feedback which I am using in a Update statement inside a process after submit.
    Anything else if you needed then please let me know...
    Bhushan
    Edited by: user8737418 on Dec 10, 2009 6:05 AM
    Edited by: user8737418 on Dec 10, 2009 6:06 AM

    Hello All,
    I am still hunting for the solution, but this time I will be more specific about the error, As I mentioned earlier I am getting an error of "404 Not Found" whenever I try to insert 2000 characters in an APEX_ITEM.TEXTAREA() which I am passing to an UPDATE statement using APEX_APPLICATION.G_Fxx(i).
    Now to get the details of this "404 Not Found" error I set the "error-style" attribute of APEX DAD to a value "DebugStyle" using DBMS_EPG.SET_DAD_ATTRIBUTE() procedure (for more information you can refer to PLSQL Package and Types 11g b28419.pdf). By setting this attribute I got the detailed error as:
    ORA-06550: line 6, column 34:
    PLS-00302: component 'VC_ARR29' must be declared
    ORA-06550: line 6, column 6:
    PL/SQL: Item ignored
    ORA-06550: line 33, column 2:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 33, column 2:
    PL/SQL: Statement ignored
    ORA-06550: line 34, column 2:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 34, column 2:
    PL/SQL: Statement ignored
    ORA-06550: line 35, column 2:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 35, column 2:
    PL/SQL: Statement ignored
    ORA-06550: line 36, column 188:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 36, column 3:
    PL/SQL: Statement ignored
    DAD name: apex
    PROCEDURE : wwv_flow.accept
    URL : http://XDB HTTP Server:8080/apex/wwv_flow.accept
    PARAMETERS :
    ===========
    P_FLOW_ID:
    265
    P_FLOW_STEP_ID:
    30
    P_INSTANCE:
    4162584444600813
    P_PAGE_SUBMISSION_ID:
    7894031068765644
    P_REQUEST:
    SUBMIT
    ENVIRONMENT:
    ============
    PLSQL_GATEWAY=WebDb
    GATEWAY_IVERSION=2
    SERVER_SOFTWARE=Oracle Embedded PL/SQL Gateway/10.2.0.1.0
    GATEWAY_INTERFACE=CGI/1.1
    SERVER_PORT=8080
    SERVER_NAME=XDB HTTP Server
    REQUEST_METHOD=POST
    QUERY_STRING=
    PATH_INFO=/wwv_flow.accept
    SCRIPT_NAME=/apex
    REMOTE_HOST=
    REMOTE_ADDR=192.168.1.11
    SERVER_PROTOCOL=HTTP/1.1
    REQUEST_PROTOCOL=tcp
    REMOTE_USER=ANONYMOUS
    ORACLE_SSO_USER=
    OSSO_IDLE_TIMEOUT_EXCEEDED=
    OSSO_USER_GUID=
    HTTP_CONTENT_LENGTH=7932
    HTTP_CONTENT_TYPE=application/x-www-form-urlencoded
    HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5
    HTTP_HOST=192.168.1.2:8080
    HTTP_ACCEPT=text/html
    HTTP_ACCEPT_ENCODING=gzip
    HTTP_ACCEPT_LANGUAGE=en-us
    HTTP_ACCEPT_CHARSET=ISO-8859-1
    HTTP_COOKIE=WWV_CUSTOM-F_1787018490882782_265=7D367A6CA84F13A0; ORA_WWV_USER=225BC5AC3766601D; ORA_WWV_REMEMBER_UN=BS:proto1; LOGIN_USERNAME_COOKIE=pavan.bhojwani; ORA_WWV_ATTRIBUTE_PAGE=4301%2C%23HH; ORA_WWV_R1=%23ALL; ORA_WWV_R2=%23ALL; ORA_WWV_R3=%23ALL
    HTTP_IF_MODIFIED_SINCE=
    HTTP_REFERER=http://192.168.1.2:8080/apex/f?p=265:30:4162584444600813::NO:::
    HTTP_SOAPACTION=
    HTTP_ORACLE_ECID=
    HTTP_ORACLE_CACHE_VERSION=
    HTTP_AUTHORIZATION=
    WEB_AUTHENT_PREFIX=
    DAD_NAME=apex
    DOC_ACCESS_PATH=docs
    DOCUMENT_TABLE=wwv_flow_file_objects$
    PATH_ALIAS=
    REQUEST_CHARSET=AL32UTF8
    REQUEST_IANA_CHARSET=UTF-8
    SCRIPT_PREFIX=
    HTTP_IF_MATCH=
    HTTP_CACHE_CONTROL=
    SOAP_BODY=
    HTTP_X_ORACLE_DEVICE_CLASS=
    HTTP_X_ORACLE_DEVICE_ORIENTATION=
    HTTP_X_ORACLE_DEVICE_MAXDOCSIZE=
    HTTP_X_ORACLE_DEVICE=
    HTTP_X_ORACLE_ORIG_ACCEPT=
    HTTP_X_ORACLE_ORIG_USER_AGENT=
    HTTP_X_ORACLE_USER_LOCALE=
    HTTP_X_ORACLE_USER_NAME=
    HTTP_X_ORACLE_USER_DISPLAYNAME=
    HTTP_X_ORACLE_USER_USERKIND=
    HTTP_X_ORACLE_USER_AUTHKIND=
    HTTP_X_ORACLE_USER_DEVICEID=
    HTTP_X_ORACLE_USER_LOCATION_ADDRESSLINE1=
    HTTP_X_ORACLE_USER_LOCATION_ADDRESSLINE2=
    HTTP_X_ORACLE_USER_LOCATION_ADDRESSLASTLINE=
    HTTP_X_ORACLE_USER_LOCATION_BLOCK=
    HTTP_X_ORACLE_USER_LOCATION_CITY=
    HTTP_X_ORACLE_USER_LOCATION_COMPANYNAME=
    HTTP_X_ORACLE_USER_LOCATION_COUNTY=
    HTTP_X_ORACLE_USER_LOCATION_STATE=
    HTTP_X_ORACLE_USER_LOCATION_POSTALCODE=
    HTTP_X_ORACLE_USER_LOCATION_POSTALCODEEXT=
    HTTP_X_ORACLE_USER_LOCATION_COUNTRY=
    HTTP_X_ORACLE_USER_LOCATION_TYPE=
    HTTP_X_ORACLE_USER_LOCATION_X=
    HTTP_X_ORACLE_USER_LOCATION_Y=
    HTTP_X_ORACLE_SERVICE_HOME_URL=
    HTTP_X_ORACLE_SERVICE_PARENT_URL=
    HTTP_X_ORACLE_HOME_URL=
    HTTP_X_ORACLE_MODULE_CALLBACK_URL=
    HTTP_X_ORACLE_MODULE_CALLBACK_LABEL=
    HTTP_X_ORACLE_CACHE_USER=
    HTTP_X_ORACLE_CACHE_SUBID=
    HTTP_X_ORACLE_CACHE_AUTH=
    HTTP_X_ORACLE_CACHE_DEVICE=
    HTTP_X_ORACLE_CACHE_LANG=
    HTTP_X_ORACLE_CACHE_ENCRYPT=
    HTTP_X_ORACLE_ASSERT_US
    Any help is appreciated...
    Bhushan

  • Invalid Syntax error while using Ant and WLST

    I am trying to run the following code in an ant build file but continue to see the error below even though the exact same code works through the WLST console. Any help would be greatly appreciated.
    Note: * = 1 tab
    <wlst debug="true" failonerror="false">
    *<script>
    **connect('system','weblogic','t3://...')
    **apps=cmo.getAppDeployments()
    **for app in apps:
    ***if app.getName().startswith("4X"):
    ****stopApplication(app,block='true')
    ****undeploy(app.getName(),targets='MS1,MS2',block='true')
    **deploy('4X','//box/domains/applications/4X.ear',targets='MS1,MS2',stageMode='stage',block='true')
    **apps=cmo.getAppDeployments()
    **for app in apps:
    ***if app.getName().startswith("4X"):
    ****startApplication(app.getName(),block='true')
    *</script>
    </wlst>
    When this is run I get the following error:
    BUILD FAILED
    C:\docume~1\dtanner\desktop\RELupdate.xml:134: Error executing the script snippe
    t
    connect('system','weblogic','t3://...:
    7001')
    apps=cmo.getAppDeployments()
    for app in apps:
    if app.getName().startswith("reporting-r
    eport"):
    stopApplication(app,block='true'
    undeploy(app,targets='MS1,MS2',b
    lock='true')
    deploy('reporting-report-server','//box1/do
    mains/applications/reporting-report-server.war',targets='MS1,MS2',stageMode='sta
    ge',block='true')
    apps=cmo.getAppDeployments()
    for app in apps:
    if app.getName().startswith("reporting-r
    eport"):
    startApplication(app,block='true
    due to:
    Traceback (innermost last):
    (no code object) at line 0
    SyntaxError: ('invalid syntax', ('<string>', 2, 33, '\t\t\t\tapps=cmo.getAppDepl
    oyments()'))

    Hi,
    Move the row from IT_MSEG into a work area and use it. Declare the workarea of required type.
    DATA:l_werks type werks.
    read table it_mseg into wa_mseg index 1.
    l_werks = wa_MSEG-WERKS.
    Regards
    Vinod

  • Screen number error while using tcode se93....

    Hi Abapers,
               I m converting a report program into a t-code using se93.
    after giving program name,description, screen number should be given, here the screen number should be given as per the system>status>screen number or v should be write call screen in the program.
      i m confused wit it, i had checked the forum also.
    REPORT  ZWHILE1.
    data: length type i value 0,
           strl type i value 0,
           string(30) type c value 'test string'.
    strl = strlen(string).
    while string NE space.
      write string(1).
      length = sy-index.
      shift string.
    endwhile.
    write:/ 'strlen:',strl.
    write:/ 'length of abcd:', length.
    the above s my my program,i want to convert t into a tcode.
    Advanced thanks....

    hi,
    here are the steps to create
    Creating transaction code for the table:
    1) Go to SE93 and Create a Tcode.
    2) Click on the u2018Transaction with parametersu2019 radio button and continue.
    3) Enter the Transaction as SM30.
    4) Select u2018Skip initial screenu2019.
    5) Enter VIEWNAME value as Table name (here Z*) and UPDATE value as X in the u2018Name of screen fieldu2019 and save.
    VIEWNAME ZTABLE
    UPDATE X
    Note : The VIEWNAME,UPDATE and their respective values should be Capital.
    If u want to create table maintenance generator then,
    1) Choose Delivery and Maintainence tab..
    2) Select Delivery class as u2018Cu2019.
    3) Select Data browser/Table view Maint as DISPLAY/MAINTAINENCE ALLOWED.
    4) Create a Function Group from SE80.
    5) Select TABLE MAINTAINENCE GENERATOR from Utilities of menu bar.
    6) Fill the Authorization Group as u2018&NC&u2019 and give the created Function Group.
    7) Give a screen number not used as Maint Screen no (eg: 9999) and click u2018CREATEu2019(F8).
    regards
    rahul

  • 'ORA-01722: Invalid Number' error while Running a Query

    Hi,
    I'm trying to run a query built on a DSO. The DSO has a field 'Start Date'. This Start Date InfoObject has a reference Char as 0DATE.
    This Start Field has blank values due to which I'm getting the ORA-01722 error. I came across many threads with same topic of discussion. As mentioned in one of the Threads I have written a program to update 'Start Date' with 00000000. The code wriiten is "UPDATE /BIC/AZ_MONINV00 SET /BIC/ZSTR_DTE = '00000000' where /BIC/ZSTR_DTE = ' '.
    Now when I see the data in the active data table of DSO the blank value is replaced with '00000000'.
    But If I right click on the DSO click on display data the 'Start Date' field is blank. And now the Query also gets executed without any error. But in the output of the query the 'Start Date' Field has "#" values.
    Can anyone suggest on how can I make these "#" values appear as 00000000 in the report?

    In this case, you have to write a macro to avoid # in Analyzer.
    Right Click-->Display Data will show data from Active table of DSO only.
    If you don't want to show any blank date values in the report, you can exclude in Filter in Query.

  • ORA-00902: invalid datatype comile error while using CAST function

    Hi everyone,
    I'm getting ORA-00902: invalid datatype compilation error while using CAST function.
    open ref_cursor_list for select empName from TABLE(CAST(part_t AS partnumberlist));
    The partnumberlist and ref_cursor_list is declared in the Package spec as given below.
    TYPE ref_cursor_list IS REF CURSOR;
    TYPE partnumberlist IS TABLE OF emp.empName%TYPE;
    The error points the partnumberlist as invalid datatype in TOAD because of this i'm unable to compile the package.
    Any suggestion
    Thanks and regards
    Sathish Gopal

    Here is my code for
    package Spec
    CREATE OR REPLACE PACKAGE "HISTORICAL_COMMENTZ" AS
    TYPE prior_part_data_record IS RECORD (
    prior_part_row_id PGM_RPLCMNT_PART.PR_PART_ROW_S_ID%TYPE,
    prior_pgm_chng_s_id PGM_RPLCMNT_PART.PR_PGM_CHNG_S_ID%TYPE
    TYPE parts_list IS TABLE OF prior_part_data_record;
    --TYPE parts_list IS TABLE OF NUMBER;
    TYPE partnumberlist IS TABLE OF PGM_RPLCMNT_PART.PR_PART_ROW_S_ID%TYPE;
    TYPE partnumber_cursor IS REF CURSOR;
    TYPE comment_record IS RECORD (
    pgm_s_id                     PGM_PART_CMNT.PGM_S_ID%TYPE,
    part_row_s_id                PGM_PART_CMNT.PART_ROW_S_ID%TYPE,
    pgm_chng_s_id                PGM_PART_CMNT.PGM_CHNG_S_ID%TYPE,
    cmnt_txt                     PGM_PART_CMNT.CMNT_TXT%TYPE,
    cmnt_dt                     PGM_PART_CMNT.CMNT_DT%TYPE,
    updt_rsrc_id                PGM_PART_CMNT.UPDT_RSRC_ID%TYPE
    TYPE comment_list IS TABLE OF comment_record;
    global_pgm_s_id INTEGER := 0;
    global_part_row_s_id INTEGER := 0;
    err_num NUMBER := 999999;
    err_msg VARCHAR2 (250);
    PROCEDURE getComments (
    pgm_s_id IN NUMBER,
    part_row_s_id IN NUMBER,
    partnumber_cursorlist out partnumber_cursor);
    END;
    Package Body
    CREATE OR REPLACE PACKAGE BODY HISTORICAL_COMMENTZ
    AS
    FUNCTION getPriorPart
    (param_prior_pgm_chng_s_id IN PGM_RPLCMNT_PART.PR_PGM_CHNG_S_ID%TYPE,
    return_prior_part_data_record IN OUT prior_part_data_record
    RETURN INTEGER
    IS
    retVal INTEGER;
    prior_part_row_id INTEGER;
    prior_pgm_chng_s_id INTEGER;
    local_prior_part_data_record prior_part_data_record;
    BEGIN
    SELECT PR_PART_ROW_S_ID AS prior_part_row_id, PR_PGM_CHNG_S_ID AS prior_pgm_chng_s_id
    INTO local_prior_part_data_record
    --SELECT PR_PART_ROW_S_ID INTO retVal
    FROM PGM_RPLCMNT_PART
    WHERE PGM_S_ID = global_pgm_s_id AND CUR_PGM_CHNG_S_ID = param_prior_pgm_chng_s_id;
    return_prior_part_data_record := local_prior_part_data_record;
    retVal := 0;
    RETURN retVal;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    retVal := -1;
    RETURN retVal;
    WHEN OTHERS
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    retVal := -1;
    RETURN retVal;
    END getPriorPart;
    FUNCTION getComment (found_parts_list IN parts_list, comments OUT comment_list)
    RETURN INTEGER
    IS
    CURSOR init_cursor
    IS
    SELECT PGM_S_ID,PART_ROW_S_ID,PGM_CHNG_S_ID,CMNT_TXT,CMNT_DT,UPDT_RSRC_ID
    FROM PGM_PART_CMNT WHERE 1 = 2;
    retVal INTEGER;
    indexNum PLS_INTEGER;
    local_part_record prior_part_data_record;
    local_comment_record comment_record;
    local_part_row_s_id NUMBER;
    i PLS_INTEGER;
    BEGIN
    OPEN init_cursor;
    FETCH init_cursor
    BULK COLLECT INTO comments;
    i := 0;
    indexNum := found_parts_list.FIRST;
    WHILE indexNum IS NOT NULL
    LOOP
    local_part_record := found_parts_list(indexnum);
    local_part_row_s_id := local_part_record.prior_part_row_id;
    SELECT PGM_S_ID,PART_ROW_S_ID,PGM_CHNG_S_ID,CMNT_TXT,CMNT_DT,UPDT_RSRC_ID
    INTO local_comment_record FROM PGM_PART_CMNT
    WHERE PGM_S_ID = global_pgm_s_id
    AND PART_ROW_S_ID = local_part_row_s_id;
    comments(i) := local_comment_record;
    i := i + 1;
    END LOOP;
    RETURN retval;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    RETURN retval;
    WHEN OTHERS
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    RETURN retval;
    END getComment;
    PROCEDURE getComments
    pgm_s_id IN NUMBER,
    part_row_s_id IN NUMBER,
    partnumber_cursorlist OUT partnumber_cursor)
    IS
    comment_recordlist comment_record;
    retPartnumberlist partnumberlist;
    found_parts_list parts_list;
    local_part_record prior_part_data_record;
    is_more_parts BOOLEAN;
    driver_chng_s_id NUMBER;
    num_parts NUMBER;
    retVal NUMBER;
    comments comment_list;
    returnPartnumberlist partnumberlist;
    iloopCounter PLS_INTEGER;
    inx1 PLS_INTEGER;
    part_t partnumberlist :=partnumberlist(100,200,300);
    CURSOR part_list_init_cursor
    IS
    SELECT PR_PART_ROW_S_ID,PR_PGM_CHNG_S_ID FROM PGM_RPLCMNT_PART WHERE 1 = 2;
    CURSOR inIt_cursor
    IS
    SELECT 0 FROM DUAL WHERE 1 = 2;
    BEGIN
    DBMS_OUTPUT.ENABLE (5000000);
    global_pgm_s_id := pgm_s_id;
    global_part_row_s_id := part_row_s_id;
    SELECT PART_ROW_S_ID AS prior_part_row_id, PR_PGM_CHNG_S_ID AS prior_pgm_chng_s_id
    INTO local_part_record
    FROM PGM_RPLCMNT_PART
    WHERE PGM_S_ID = global_pgm_s_id AND PART_ROW_S_ID = global_part_row_s_id AND
    CUR_PGM_CHNG_S_ID IN (SELECT MAX(CUR_PGM_CHNG_S_ID) FROM PGM_RPLCMNT_PART WHERE
    PGM_S_ID = global_pgm_s_id AND PART_ROW_S_ID = global_part_row_s_id
    GROUP BY PART_ROW_S_ID);
    OPEN part_list_init_cursor;
    FETCH part_list_init_cursor
    BULK COLLECT INTO found_parts_list;
    -- Add the existing part to the found list
    found_parts_list.EXTEND;
    found_parts_list(1) := local_part_record;
    driver_chng_s_id := local_part_record.prior_pgm_chng_s_id;
    num_parts := 1;
    is_more_parts := TRUE;
    WHILE (is_more_parts) LOOP
    retVal := getPriorPart(driver_chng_s_id,local_part_record);
    IF (retVal != -1) THEN
    found_parts_list.EXTEND;
    num_parts := num_parts + 1;
    found_parts_list(num_parts) := local_part_record;
    driver_chng_s_id := local_part_record.prior_pgm_chng_s_id;
    ELSE
    is_more_parts := FALSE;
    END IF;
    END LOOP;
    --num_parts := getComment(found_parts_list,comments);
    OPEN init_cursor;
    FETCH init_cursor
    BULK COLLECT INTO returnPartnumberlist;
    num_parts := found_parts_list.COUNT;
    FOR iloopCounter IN 1 .. num_parts
    LOOP
    returnPartnumberlist.EXTEND;
    returnPartnumberlist(iloopCounter) := found_parts_list(iloopCounter).prior_part_row_id;
    END LOOP;
    retPartnumberlist := returnPartnumberlist;
    open
    *          partnumber_cursorlist for select PR_PART_ROW_S_ID from TABLE(CAST(retPartnumberlist AS historical_commentz.partnumberlist));*                              
    DBMS_OUTPUT.put_line('Done....!');
    EXCEPTION
    some code..............................
    END getComments;
    END HISTORICAL_COMMENTZ;
    /

  • Invalid Number Error for Decimal Field While Loading Data

    I am loading a delimited text file using the SQL* loader however I am reciving an error in my decimal fields. When a decimal field only has leading zeros before the decimal point I receive invalid number error. Below will clarify:
    i.e.) 00000000.30 [*Invalid number*]
    i.e.) 00046567.45 [*Valid number*]
    i.e.) 00000001.00 [*Valid number*]
    I've tried setting the precision/scale in the table, tried declaring it a decimal field instead of number, none of these methods fixed the issue. Any help I would really appreciate.
      POLICY_NUMBER             NUMBER,
      EFFECTIVE_DATE     DATE "YYYYMMDD"          NULLIF EFFECTIVE_DATE = '',
      TRANSACTION_DATE     DATE "YYYYMMDD",
      TRANSACTION_AMOUNT     DECIMAL EXTERNAL,   -- Tried TRANSACTION_AMOUNT DECIMAL EXTERNAL (10)  & TRANSACTION_AMOUNT NUMBER
      MF_TRX_CODE          NUMBER,
      USER_ID          CHAR,
      GROUP_NUMBER          NUMBER,
      EXPIRATION_DATE     DATE "YYYYMMDD"          NULLIF EXPIRATION_DATE = '',
      BILL_NUMBER          NUMBER,Any help is greatly appreciated. Thanks before hand.

    Hi,
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL> SELECT * FROM TEST;
    TRANSACTION_AMOUNT
    SQL> SELECT * FROM TEST;
    TRANSACTION_AMOUNT
              11000,00
                293,37
               2000,00
               1134,32
                  0,30
    SQL>Between the selects I loaded the table with sql*loader using...
    Load Data
    INFILE *
    APPEND
    INTO TABLE TEST
    FIELDS TERMINATED BY '|'
    TRAILING NULLCOLS
      TRANSACTION_AMOUNT     DECIMAL EXTERNAL
    BEGINDATA
    00011000.00
    00000293.37
    00002000.00
    00001134.32
    00000000.30The log is
    SQL*Loader: Release 10.2.0.1.0 - Production on Tue Dec 23 17:23:47 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Control File:   test.ctl
    Data File:      test.ctl
      Bad File:     test.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table TEST, loaded from every logical record.
    Insert option in effect for this table: APPEND
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    TRANSACTION_AMOUNT                  FIRST     *   |       CHARACTER           
    Table TEST:
      5 Rows successfully loaded.
      0 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                  16512 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             5
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Tue Dec 23 17:23:47 2008
    Run ended on Tue Dec 23 17:23:50 2008
    Elapsed time was:     00:00:02.86
    CPU time was:         00:00:00.06Regards,

  • At&t +1 (1) (216)116-11 error invalid number please resend using 10 digit mobile number

    tried all the method proposed for former similar questions. None works. Even more confused about whether it is the problem of AT&T or apple or both? How can I solve it. It's really annoying!

    Are you in the US? If you are in the US, you don't need to call or text the full number unless it is a toll free number.
    You can just use the 10 digit number XXX-XXX-XXXX
    It seems the number is invalid so AT&T respond back saying that "at&t +1 (1) (216)116-11 error invalid number please resend using 10 digit mobile number"
    If you are using the right number and you know for sure it is a working number, try delete the number in question that you try to text to like call history or text history of that number and just delete it. Do not delete the number in your contacts though. Delete history pertaining to it in calls and text.
    Then try it again to text to the number.

  • Error while using exp utility

    Hi,
    I am getting the following oracle error while using exp,
    can someone please suggest on this,
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user SIEBEL
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user SIEBEL
    About to export SIEBEL's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export SIEBEL's tables via Conventional Path ...
    . . exporting table EIM_ACCDTL_TNT
    EXP-00008: ORACLE error 904 encountered
    ORA-00904: "MAXSIZE": invalid identifier
    . . exporting table EIM_ACCNTROUTE
    EXP-00008: ORACLE error 1003 encountered
    ORA-01003: no statement parsed
    . . exporting table EIM_ACCNT_CUT
    EXP-00008: ORACLE error 904 encountered
    ORA-00904: "MAXSIZE": invalid identifier
    . . exporting table EIM_ACCNT_DTL
    EXP-00008: ORACLE error 1003 encountered
    ORA-01003: no statement parsed

    Satish is right, there exists bug for 11.1.0.6.
    Look at metalink note 741984.1.
    Bug number is 5872788 - there exists patch as well.

  • Invalid number error , number column as last field in my csv

    LOAD DATA
    INFILE 'test.csv' "str '#'"
    APPEND
    INTO TABLE esgapp.c_test
    FIELDS TERMINATED BY "," Optionally enclosed by '"'
    TRAILING NULLCOLS
    rstring,
    rtext char(12000) ENCLOSED BY '<start>' and '<end>',
    ruser,
    rid SEQUENCE(MAX,1)
    This control file is working good . But what i have done is i have altered my table *ruser* column which was earlier varchar now it is number . the data in the ruser is number , now i am getting an error while executing the the script
    it is throwing an invalid number error .
    i have tried this changes before i post this post in the control file but all are throwing the invalid number error
    ruser char "to_number(rtrim(ltrim(:ruser)))"
    and
    ruser decimal external
    csv file
    hello,<start>bla...bla...bla...bla,-996203
    error
    invalid number
    Edited by: user7955917 on Mar 5, 2012 9:34 AM
    Edited by: user7955917 on Mar 5, 2012 9:41 AM
    Edited by: user7955917 on Mar 5, 2012 9:42 AM

    But....If your Oracle version is 10g+, you can define the file as external table and use the "RECORDS DELIMITED BY '#'" parameter.
    :p

Maybe you are looking for

  • Problem on SuSE-10

    Hi All : I installed NCL on SuSE 10 (The unsupported hack @ http://www.novell.com/coolsolutions/feature/16101.html) but can't get anything to work. I read other people could browse Trees and Servers but that is not working on mine :-( As sson as I op

  • Installed itunes on ext. hard drive, now I cant import a cd???

    I just installed itunes on my external hard drive (connects to my laptop via USB). Now, when I put a CD into my laptop - nothing happens. It does not appear under the source list. If I choose import, then find the disc it shows tracs and will allow m

  • SQL query Output  exceeds 65000 rows in excel

    Hi, I have a SQL file attached to my concurrent program. The query in the SQL file returns tab separated output that i need to email as a csv through the same SQL file. The issue I am facing is that the query returns about 157000 records but only 655

  • Encrypt-Decrypt in XI

    Hi ,    Can any one explain me how do u perform encryption decryption in XI    with an example.    I Just knw that it is possible through Java  mapping.   but i dont knw how to do it. can any one send a sample code on   [email protected]    Is it pos

  • JScrollPane bar alignment

    I posted this to ProjectSwing forum and never got a reply, maybe here someone knows... I tried all the suggested methods, and yet I still get the vertical scroll bar aligned somewhere in the middle when the JFrame opens, when top alignment would be p