- ORA-01727: numeric precision specifier is out of range (1 to 38)

What is cause of above error??
SQL> SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_sql_tuning_task_1') from DUAL;
DBMS_SQLTUNE.REPORT_TUNING_TASK('MY_SQL_TUNING_TASK_1')
GENERAL INFORMATION SECTION
Tuning Task Name : my_sql_tuning_task_1
Tuning Task Owner : SYS
Workload Type : Single SQL Statement
Scope : COMPREHENSIVE
Time Limit(seconds): 3600
Completion Status : COMPLETED
Started at : 09/27/2012 13:24:45
Completed at : 09/27/2012 13:24:45
Schema Name: PDS
SQL ID : 4wv8x1b10dvk0
SQL Text : INSERT INTO dlg_participant
(dp_dg_id, dp_dlg_id, dp_customer_id, dp_context,
dp_inserted_timestamp, dp_moved_timestamp, dp_active,
dp_internal_id)
(SELECT
cast(:1 as number(:"SYS_B_0")),
cast(:2 as number(:"SYS_B_1")),
mh_customer_id,
mh_context,
SYSDATE,
SYSDATE,
cast(:3 as number(:"SYS_B_2")),
cast(:4 as number(:"SYS_B_3"))
FROM
(SELECT
Relations.MARE_ID as mh_customer_id,
:"SYS_B_4" as mh_context,
null as mh_participant_id
FROM
(select *
from Testuser.RelationsEnriched_10M
) Relations
WHERE
((:5 >= Relations.MARE_ID))) AND
NOT EXISTS (SELECT
dp_id
FROM
dlg_participant,
dlg_group
WHERE
(dp_dg_id = dg_id) AND
(dg_dlg_id = :6) AND
(dp_active = :7) AND
(dp_customer_id = Relations.MARE_ID))) mh_container)
Bind Variables :
2 - (NUMBER):9
4 - (NUMBER):9
6 - (NUMBER):18
8 - (NUMBER):18
10 - (NUMBER):1500000
11 - (NUMBER):1053
12 - (NUMBER):0
ERRORS SECTION
- ORA-01727: numeric precision specifier is out of range (1 to 38)
-------------------------------------------------------------------------------

Strange as none of the number datatype is more than 38
SQL> desc testuser.relationsenriched_10m
Name Null? Type
MAEX_VALUE_CODE_002 NUMBER(38)
MAEX_PHONE_IND_DATE DATE
MAEX_TOTAL_SWITCH_DATE DATE
MAEX_VALUE_CODE_002_DATE DATE
MARE_COMP_FS_PC VARCHAR2(199)
MARE_DEALER_RETAIL VARCHAR2(7)
MARE_CONSODATA_IND VARCHAR2(2)
MAEX_VALUE_CODE_003 NUMBER(38)
MARE_EXT_KEY1_NR VARCHAR2(199)
MARE_GM_CARD_CODE VARCHAR2(199)
MAEX_LAST_CHANGE_DATE DATE
MAAD_MARE_ID NUMBER(38)
MAEX_MAIL_IND_DATE DATE
MARE_PERS_TITLE VARCHAR2(6)
MARE_EXT_KEY3_NR VARCHAR2(199)
MARE_BSM_DATE VARCHAR2(199)
MARE_ID NUMBER(38)
MARE_GM_CARD_STATUS VARCHAR2(199)
MAAD_PREFERED_IND VARCHAR2(2)
MAEX_SMS_IND_DATE DATE
MARE_RELATED_CODE VARCHAR2(199)
MARE_FAX FLOAT(126)
MACA_MARE_ID NUMBER(38)
MACA_REGDATE_OWNER_YEAR NUMBER(38)
MAEX_EMAIL_IND_DATE DATE
MAEX_MAILABLE_IND6 VARCHAR2(2)
MARE_PERS_LAST_NAME VARCHAR2(42)
MARE_PERS_SALUTATION VARCHAR2(9)
MARE_PERS_FIRST_NAMES VARCHAR2(51)
MARE_SUB_TYPE VARCHAR2(2)
MACA_PREFERED_IND VARCHAR2(2)
MAEX_CONTROL_GROUP_DATE DATE
MARE_MOBILE_PHONE VARCHAR2(21)
MARE_COMP_ID NUMBER(38)
MARE_EXT_KEY1_CHAR VARCHAR2(16)
MARE_FIRST_CONTACT_DATE DATE
MARE_MOI1_DESCR VARCHAR2(21)
MAEX_MAILABLE_IND9 VARCHAR2(2)
MARE_MOI1 VARCHAR2(11)
MARE_MAAD_ID_T NUMBER(38)
MARE_COMP_SIZE_CAT NUMBER(38)
MAEX_SMS_IND VARCHAR2(2)
MARE_PERS_LAST_NAME_SECOND VARCHAR2(15)
MAEX_VALUE_CODE_001_DATE DATE
MARE_ORDER_T NUMBER(38)
MARE_BSM_IND VARCHAR2(2)
MACA_BRAND VARCHAR2(12)
MACA_DEALER_RETAIL VARCHAR2(7)
MARE_HOME_PHONE VARCHAR2(21)
MAEX_MAIL_IND VARCHAR2(2)
MARE_PERS_BIRTH_DATE DATE
MARE_CNSMR_TYPE VARCHAR2(2)
MAEX_MAILABLE_IND5 VARCHAR2(2)
MARE_PERS_AGE NUMBER(38)
MAEX_MAILABLE_IND1 VARCHAR2(2)
MARE_INSRC_RNWL_DATE DATE
MACA_NEW_USED VARCHAR2(5)
MARE_LOAD_DATE DATE
MARE_PERS_MAR_STATUS VARCHAR2(199)
MARE_PERS_PREFIX VARCHAR2(7)
MARE_COMP_SIZE NUMBER(38)
MAEX_VALUE_CODE_100_DATE DATE
MARE_HISTORY_FILE VARCHAR2(26)
MARE_COMP_NAME VARCHAR2(108)
MARE_IDX_T VARCHAR2(51)
MARE_DEALER_RETAIL_NAME VARCHAR2(41)
MACA_OWNER_TYPE VARCHAR2(2)
MARE_CREATION_DATE DATE
MARE_MACA_ID_T NUMBER(38)
MARE_EXT_KEY3_CHAR VARCHAR2(199)
MAAD_POSTAL_CODE VARCHAR2(8)
MAEX_MARE_ID NUMBER(38)
MARE_CNSMR_TYPE_CODE NUMBER(38)
MARE_SOURCE VARCHAR2(5)
MARE_LAST_CONTACT_DATE DATE
MARE_EXT_KEY2_CHAR VARCHAR2(199)
MAEX_ID NUMBER(38)
MAEX_TOTAL_SWITCH VARCHAR2(2)
MARE_EMAIL VARCHAR2(53)
MARE_DEALER_SERV_NAME VARCHAR2(41)
MARE_WORK_PHONE VARCHAR2(21)
MAEX_VALUE_CODE_100 NUMBER(38)
MAEX_PHONE_IND VARCHAR2(2)
MARE_AERD VARCHAR2(199)
MARE_SPS_FILE_ID NUMBER(38)
MAEX_LOAD_DATE DATE
MARE_MOI5 VARCHAR2(11)
MAEX_MAILABLE_IND7 VARCHAR2(2)
MAEX_VALUE_CODE_001 NUMBER(38)
MARE_COMP_NAME_2 VARCHAR2(172)
MARE_SOFI_NR VARCHAR2(17)
MARE_COMP_CODE VARCHAR2(199)
MARE_COMP_FS_CC VARCHAR2(199)
MAEX_MAILABLE_IND4 VARCHAR2(2)
MARE_DEALER_PREF VARCHAR2(7)
MARE_LANG_CODE VARCHAR2(3)
MACA_REGDATE_CAR_YEAR NUMBER(38)
MARE_PERS_INITIALS VARCHAR2(7)
MARE_DEAR_SALUTATION VARCHAR2(50)
MAEX_MAILABLE_IND8 VARCHAR2(2)
MAEX_TITLE_IND VARCHAR2(2)
MARE_MATCHING_IDX VARCHAR2(199)
MARE_MOI3 VARCHAR2(11)
MARE_DEALER_PREF_NAME VARCHAR2(2)
MARE_ENVELOPE_NAME VARCHAR2(199)
MARE_PERS_CHILD_UNDER_18 VARCHAR2(199)
MARE_MOI2 VARCHAR2(11)
MARE_RELATED_DESCR VARCHAR2(199)
MARE_EXT_KEY2_NR VARCHAR2(199)
MARE_PERS_GENDER VARCHAR2(2)
MACA_MODEL VARCHAR2(16)
MARE_PERS_HH_SIZE VARCHAR2(199)
MAEX_TITLE_IND_DATE DATE
MARE_LAST_CHANGE_DATE DATE
MARE_MOI4 VARCHAR2(11)
MAEX_MAILABLE_IND2 VARCHAR2(2)
MARE_DEALER_SERV VARCHAR2(7)
MAEX_VALUE_CODES VARCHAR2(25)
MARE_NAME_T VARCHAR2(51)
MAEX_VALUE_CODE_003_DATE DATE
MARE_PERS_HH_CARS VARCHAR2(199)
MAEX_MAILABLE_IND3 VARCHAR2(2)
MARE_ERD NUMBER(38)
MAEX_CREATION_DATE DATE
MARE_IERD VARCHAR2(199)
MAEX_CONTROL_GROUP NUMBER(38)
MAEX_EMAIL_IND VARCHAR2(2)
MARE_COMP_FS_TOT VARCHAR2(199)
MARE_RELT_ID NUMBER(38)
MARE_PERS_ID NUMBER(38)
SQL> desc pds.dlg_participant
Name Null? Type
DP_ID NOT NULL NUMBER(18)
DP_DG_ID NOT NULL NUMBER(9)
DP_DLG_ID NOT NULL NUMBER(9)
DP_CUSTOMER_ID NOT NULL NUMBER(38)
DP_CONTEXT NOT NULL NVARCHAR2(128)
DP_INSERTED_TIMESTAMP NOT NULL DATE
DP_MOVED_TIMESTAMP NOT NULL DATE
DP_PART_STAMP NVARCHAR2(3)
DP_ACTIVE NOT NULL NUMBER(18)
DP_INTERNAL_ID NUMBER(18)
DP_CUSTOM_VALUES NCLOB

Similar Messages

  • ORA-01727 during impdp transportable datafiles:numeric precision specifier

    I started impdp the rman converted the datafiles into tartget and got error on one of the table:
    ORA-01727: numeric precision specifier is out of range 1 to 38
    I tried to fix it by create the table definition by change several columns number (126) to number (38), it worked, and then I tried to impdp again with tables=tablename
    content=data_only, it give me error that the imp dump file is specific for transportable tablespace.
    I dont know how to fix this issue. Can anybody help on this?
    Thanks in advance.

    Here is the error after I created the table and then trying to import the data:
    impdp system/password dumpfile=dp_tts.dmp table_exists_action=APPEND tables=asset.customer_ticket content=data_only;
    Import: Release 11.2.0.3.0 - Production on Mon May 6 01:01:41 2013
    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    ORA-39002: invalid operation
    ORA-39061: import mode TABLE conflicts with export mode TRANSPORTABLE

  • Numeric Precision Error

    Hi,
    I am using ODP 10.2.0.2.21 with c# and .Net 2.0 and Oracle 10g.
    Most of my stored procedures output the results back to the caller in the form of a generic REF CURSOR. When I call OracleDataAdapter.Fill to populate a data-set using a call to one of these stored procedures, it works fine as long as the stored procedure returns data. If no rows are returned, I get the following error:
    [Oracle.DataAccess.Types.OracleTypeException]: numeric precision specifier is out of range (1 to 38).
    Looking up this error, I've found that it normally occurs as a result of an attempt to run some DDL SQL that creates a table with a numeric column whose precision exceeds the maximum allowable e.g. numeric(39). This is not the case here, as the stored procedures that are failing are mostly pure select statements and do not even utilise temporary tables or bulk collection. It is almost as if the OracleDataAdapter is unable to get the schema representation of the column when there is not at least one row of data.
    I have pasted the full exception stack below:
    at Oracle.DataAccess.Types.OracleDecimal.ConvertToPrecScale(OracleDecimal value1, Int32 precision, Int32 scale)
    at Oracle.DataAccess.Client.OracleParameter.PreBind_Decimal()
    at Oracle.DataAccess.Client.OracleParameter.PreBind(OracleConnection conn, IntPtr errCtx, Int32 arraySize)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
    at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
    at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
    Any help on this would be appreciated.
    Regards
    Roy Griffiths.

    Hi Mark,
    It would be difficult to distill this down to a small enough example to post, but I could email you an example if you want.
    I have done a bit more investigation however, and believe that I have found the cause of the problem.
    My application obtains the parameters for any stored procedure that it calls using OracleCommandBuilder.DeriveParameters. As this is an expensive call (it requires a round trip to the database), I cache the output when a stored procedure is called for the first time. Specifically, I store a number of properties for each stored procedure parameter, including its precision and scale. I then use the cached properties to build the parameters collection on the command object when the stored procedure is called.
    I've noticed that the OracleParameter.Precision and OracleParameter.Scale properties always return zero, regardless of the definition of the parameter on the stored procedure. I've also noticed that there are 2 private member variables (m_precision and m_scale) that contain non-zero values. If I use reflection to obtain and cache these values and use them to set the scale and precision of Command.Parameters[n] then the problem goes away.
    I'm not particularly keen on this as a solution however, and would much rather use the public properties for precision and scale (OracleParameter.Precision and OracleParameter.Scale). Do you have any idea why they don't return values?
    Regards
    Roy.

  • ORA-30352: inconsistent numeric precision or string length

    Trying to create a materialized view and am getting this error.
    ORA-30352: inconsistent numeric precision or string length
    How do I fix this?

    Mix and matching of types with my facts and dimensions. Making them the same resolved this.
    Edited by: user7853353 on Jun 18, 2012 5:33 PM

  • ORA-01426: numeric overflow when creating job

    Hello,
    When executing the following script to create a job I get the error "ORA-01426: numeric overflow" . When I execute the same script on another database with same version and same configuration I do not get the error and the job is created.
    Can anyone help me out solving this issue?
    Script:
    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    ( job => X
    ,what => 'insert into dba.dba_logs values (''SGC'',''TRL03'',sysdate,null);
    commit;
    ,next_date => to_date('07-11-2010 02:00:00','dd/mm/yyyy hh24:mi:ss')
    ,interval => 'NEXT_DAY(TRUNC(SYSDATE)+2/24,''SUNDAY'')'
    ,no_parse => FALSE
    SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
    COMMIT;
    END;
    Database version: 11.2.0.1
    OS: HPUX

    We are planning to migrate to dbms_scheduler, but that's in the future. for now we have this error first to solve.
    We also tried the following with dbms_scheduler and it gives the same error. The strange is that in another database with same version and same OS it works fine.
    BEGIN
    SYS.DBMS_SCHEDULER.CREATE_JOB
    job_name => 'JOB_CLIENTES_IN'
    ,start_date => SYSTIMESTAMP
    ,repeat_interval => 'FREQ=MINUTELY;INTERVAL=10'
    ,end_date => NULL
    ,job_type => 'STORED_PROCEDURE'
    ,enabled => TRUE
    ,job_action => 'JOB_CLIENTES_FTP_IN'
    ,comments => 'Job que carrega os ficheiros de pre-aviso de cliente'
    END;
    ORA-01870: the intervals or datetimes are not mutually comparable
    ORA-01426: numeric overflow
    ORA-01426: numeric overflow
    ORA-06512: at "SYS.DBMS_ISCHED", line 124
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 271
    ORA-06512: at line 2
    Edited by: cibernauta on Nov 4, 2010 12:48 PM

  • Error ORA-06502, numeric or value error character to number conversion

    I have been trying to create an email including data from a table as part of the body. Whenever I try to send it, I get an error ORA-06502, numeric or value error, character to number conversion. If I take out the part referencing the table, the email will go without error, but if I put it back in I get the error.
    There is the code:
    DECLARE
    v_email_body CLOB;
    v_from_email_address VARCHAR2(100) := v('APP_USER');
    v_id NUMBER;
    BEGIN
    v_email_body := 'Please pay the attached invoice from FY '||:P14_FY||' funds
    Date: '||:P14_PURCHASE_DATE||'
    Vendor: '||:P14_VENDOR||'
    Invoice Number: '||:P14_INVOICE||'
    Invoice Date: '||:P14_INVOICE_DT||'
    Due Date: '||:P14_INVOICE_DUE_DT||'
    KSR Number: '||:P14_KSR||'
    DTS PO: '||:P14_DTS_PO||'
    FINANCE DO: '||:P14_FINANCE_PO||'
    FOR detail IN(SELECT OB_CODE
    FROM BUDGET_USED
    WHERE P_ID = :P14_ID)
    v_email_body := v_email_body||detail.OB_CODE||utl_tcp.crlf;
    LOOP
    FOR detail2 IN (SELECT ob_code, amount
    FROM budget_used
    WHERE p_id = :P14_ID)
    LOOP
    v_email_body := v_email_body||detail2.ELCID||' - '||detail2.AMOUNT||utl_tcp.crlf;
    END LOOP;
    END LOOP;
    v_email_body := v_email_body
    '||:P14_EMAIL_NOTES||'
    Thanks.
    v_id := APEX_MAIL.SEND
    (p_to => :P14_SUBMIT_TO
    ,p_cc => v('APP_USER')
    ,p_bcc => '[email protected]'
    ,p_from => v_from_email_address
    ,p_body => v_email_body
    ,p_subj => 'Invoice, '||:P14_VENDOR||', '||:P14_INVOICE||'');
    --Having set up your email, now add one (or more) attachments...
    FOR c1 in (SELECT FILENAME
    ,BLOB_CONTENT
    ,MIME_TYPE
    FROM file_subjects f, apex_application_files a
    where a.name = f.name
    and f.P_ID = :P14_ID) LOOP
    IF c1.blob_content IS NOT NULL THEN
    APEX_MAIL.ADD_ATTACHMENT( p_mail_id => v_id,
    p_attachment => c1.blob_content,
    p_filename => c1.filename,
    p_mime_type => c1.mime_type);
    END IF;
    END LOOP;
    END;
    Apex_mail.push_queue();
    This is important to my company to be able to put this data into an email. If anyone can help me, I would greatly appreciate it. Thank you in advance.

    Lets isolate the erroring line by running the code in debug mode and adding some debug lines at various stages in the code
    Apex has a builtin function named wwv_flow.debug which can print messages to the debug stack and would be visible when the page is run in debug mode.
    DECLARE
    v_email_body CLOB;
    v_from_email_address VARCHAR2(100) := v('APP_USER');
    v_id NUMBER;
    BEGIN
    wwv_flow.debug('BEGIN');
      v_email_body := 'Please pay the attached invoice from FY '||:P14_FY||' funds
      Date: '||:P14_PURCHASE_DATE||'
      Vendor: '||:P14_VENDOR||'
      Invoice Number: '||:P14_INVOICE||'
      Invoice Date: '||:P14_INVOICE_DT||'
      Due Date: '||:P14_INVOICE_DUE_DT||'
      KSR Number: '||:P14_KSR||'
      DTS PO: '||:P14_DTS_PO||'
      FINANCE DO: '||:P14_FINANCE_PO||'
      '||:P14_EMAIL_NOTES||'
      Thanks.
    wwv_flow.debug('Before sending mail');
      v_id := APEX_MAIL.SEND
      (p_to => :P14_SUBMIT_TO
      ,p_cc => v('APP_USER')
      ,p_bcc => '[email protected]'
      ,p_from => v_from_email_address
      ,p_body => v_email_body
      ,p_subj => 'Invoice, '||:P14_VENDOR||', '||:P14_INVOICE||'');
    wwv_flow.debug('Before attachements');
      --Having set up your email, now add one (or more) attachments...
      FOR c1 in
             (SELECT FILENAME
            ,BLOB_CONTENT
            ,MIME_TYPE
            FROM file_subjects f, apex_application_files a
            where a.name = f.name
            and f.P_ID = :P14_ID)
      LOOP
        IF c1.blob_content IS NOT NULL THEN
        APEX_MAIL.ADD_ATTACHMENT( p_mail_id => v_id,
        p_attachment => c1.blob_content,
        p_filename => c1.filename,
        p_mime_type => c1.mime_type);
        END IF;
      END LOOP;
    wwv_flow.debug('Finished attachements'); 
      Apex_mail.push_queue();
    END;What is the last message you see in the debug after running the page in debug mode and submitting it ?

  • Urgent - ORA-06502 numeric or value error in Complex SQL Join

    I am having trouble with a tricky bit of code.
    I have a complex join query which uses reference cursors.
    type search_cursor is ref cursor;
    c_result search_cursor;
    cursor c_result1 is
    select chemicals.*,buildings.building_name,msds.msds,chemical_ras.ra from chemicals,msds,chemical_ras,buildings;
    cv_result c_result1%rowtype;
    pv_query := 'select chemicals.*,buildings.building_name,msds.msds,chemical_ras.ra from
    chem_location_join
    right join room_permissions on chem_location_join.room_id = room_permissions.room_id
    inner join chemicals on chemicals.chemical_id = chem_location_join.chem_id
    inner join cupboards on cupboards.cupboard_id=chem_location_join.cupboard_id
    inner join rooms on rooms.room_id=chem_location_join.room_id
    inner join buildings on buildings.building_id=chem_location_join.building_id
    inner join csr on chemicals.chemical_id=csr.chemical_id
    left join msds on msds.csr_id = csr.csr_id
    left join chemical_ras on csr.csr_id= chemical_ras.csr_id
    where research_group_id = '||pv_research_group_id||' and upper(' || p_search_field || ') LIKE upper(''%' || p_search_entry || '%'') order by chemicals.chemical_name';
    Basically,
    When the italics are left out, the query runs perfectly. However, when it is put in, it returns the ORA-06502 numeric or value error.
    I have run the query in SQL using values in the where clause and it works perfectly. When i replace buildings with other similar elements, i.e. cupboard, room the query returns a similar error.
    Sorry if this seems hard to understand, if you need more clarification please reply.
    Many Thanks,
    Simon
    Message was edited by:
    SimonHollingsworth

    no but that shouldn't matter because all that cursor is doing is setting the variable cv_result equal to the same %rowtype, the where clause shouldn't be relevant. in any case I don't have a where clause when the italic bit is left out and it still works fine

  • Demonstrating numerical precision

    I'm running a workshop teaching high school students to use Labview.  For a lot of these kids, this will be the first time they use the program.  One of my favorite programming topics is understanding numerical precision and how important it is to a computer (signed vs. unsigned, integer vs. floating, 8-bit vs. 64-bit, etc).
    I'm trying to come up with some simple demonstrations in Labview to drive the point home.  Ideally, I'd assign an seemingly simple math problem to solve.  Maybe something they could do fairly easily in their head or on a calculator.  But when they program it in Labview, it comes up with a completely wrong answer because they didn't properly account for precision.
    For example, starting with a U8 integer equal to 1.  Double the number eight times in a loop.  If I ask them to predict the answer, they'll probably say "256".  But, of course, the program will come back with "0" which will force them to think why and figure it out.
    I'd welcome any clever suggestions to throw at the kids.  Nothing too complicated - I want them to be able to program it themselves after a introductory lesson on using Labview.  But something that will shock them a little and help wrap their heads around the concepts.
    Thanks!

    Definately make sure they understand that floats are not exact and test for equality just doesn't work!  I'm tired of debugging those kind of errors.  Rollover errrors is the other really common numerical error I see.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • ORA-13000: dimension number is out of range when using SDO_GEOM.RELATE

    Dear everyone
    I am attempting to workout which polygons cover the same area in order to determine distinct polygons. This is so I can then have just one copy of a polygon to a new table and delete all the duplicate polygons in the current table.
    I ran the following first to check something:
    SELECT SDO_GEOM.RELATE
       (A.geographical_coordinates,
        'DETERMINE',
        B.geographical_coordinates,
        0.05) relationship
    FROM MAP_INDEX A,
          MAP_INDEX B
    where A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULL;but got the error message:
    Error starting at line 1 in command:
    SELECT DISTINCT A.mi_prinx,
    SDO_GEOM.RELATE
       (A.geographical_coordinates,
        'EQUAL',
        B.geographical_coordinates,
        0.05)
    FROM MAP_INDEX A,
          MAP_INDEX B
    where A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULL
    Error report:
    SQL Error: ORA-13000: dimension number is out of range
    ORA-06512: at "MDSYS.SDO_GEOM", line 70
    ORA-06512: at "MDSYS.SDO_GEOM", line 2647
    13000. 00000 -  "dimension number is out of range"
    *Cause:    The specified dimension is either smaller than 1 or greater than
               the number of dimensions encoded in the HHCODE.
    *Action:   Make sure that the dimension number is between 1 and the maximum
               number of dimensions encoded in the HHCODE.I then tried the following:
    SELECT DISTINCT A.mi_prinx,
    SDO_GEOM.RELATE
       (A.geographical_coordinates,
        'EQUAL',
        B.geographical_coordinates,
        0.05)
    FROM MAP_INDEX A,
          MAP_INDEX B
    where A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULLwhich produced the following error message:
    Error starting at line 1 in command:
    SELECT
    SDO_GEOM.RELATE
    (A.geographical_coordinates,
    'EQUAL',
    B.geographical_coordinates,
    0.05) relationship
      FROM MAP_INDEX A,
           MAP_INDEX B
    Error report:
    SQL Error: ORA-13050: unable to construct spatial object
    ORA-06512: at "MDSYS.SDO_3GL", line 4
    ORA-06512: at "MDSYS.MD2", line 771
    ORA-06512: at "MDSYS.SDO_GEOM", line 2622
    ORA-06512: at "MDSYS.SDO_GEOM", line 2649
    13050. 00000 -  "unable to construct spatial object"
    *Cause:    This is an internal error.
    *Action:   Contact Oracle Support Services.Does anyone have any idea as to what I might doing wrong? The original polygons were created in MapInfo Professional 8 and I am working in 10.2g
    I believe Imust be doing something wrong. I looked into SDO_GEOM_VALIDATE but again that produce the same error message as the first one. I have previously created a spatial index and inserted the values into the USER_SDO_GEOM_METADATA view.
    I have been able to get the following to work, I was testing out examples online just to see if I could produce a result on an sdo function:
    SELECT NAME_OF_FEATURE, SDO_GEOM.SDO_AREA(GEOGRAPHICAL_COORDINATES,M.DIMINFO)
    FROM MAP_INDEX, user_sdo_geom_metadata M
    WHERE M.TABLE_NAME='MAP_INDEX' AND M.COLUMN_NAME='GEOGRAPHICAL_COORDINATES'
    AND geographical_coordinates is not null;When I drew my polygons in MapInfo, they are likely to have gone partly outside of the boundary dimension values inserted in USER_SDO_GEOM_METADATA. Is that likely to be the cause of my problems or something else?
    If it is the cause, is there away of setting up Oracle or MapInfo so that anything drawn outside of the dimension area is clipped.
    Kind regards
    Tim

    Hi Tim,
    Since Oracle 8.1.6 Oracle has suggested the use of 4 digit SDO_GTYPE values, which encode the number of dimensions in the geometry. Examples of 4 digit SDO_GTYPES include 2001 for a 2D point, 3001 for a 3D point, 2002 for a 2D linestring, 3002 for a 3D linestring, 2003 for a 2D polygon and 3003 for a 3D polygon.. Contrast these with single digit values of 1 for a point, 2 for a linestring, and 3 for a polygon.
    My guess is that at least some of your data is loaded using single digit SDO_GTYPE values, and in the function Oracle does not know the dimensionality of the data (is a vertex identified by 2, 3, or four numbers?). You can check this by doing a:
    select distinct a.geographical_coordinates.sdo_gtype from MAP_INDEX A;
    If any of the values returned are single digit values then you will know this is the problem.
    You have a few options.
    You can have Oracle automatically fix the data by migrating the data:
    execute sdo_migrate.to_current('MAP_INDEX','GEOGRAPHICAL_COORDINATES');
    This will not only set the SDO_GTYPE correctly but will also fix any ring rotation problems (ensures exterior rings are stored counter-clockwise, and interior rings are stored clockwise), it will fix ring ordering problems (ensuring an exterior ring is followed by its interior rings), and it will appropiately set values in the SDO_ELEM_INFO_ARRAY.
    After you do this you should be good to go. However, if you are using a tool to update the data and it resets the information back, then the problem will continue to plague you. You should check with your vendor if that is the case.
    Another option is to change the query to a different signature which uses the SDO_GEOM_METADATA to get the dimensionality of the data. Instead of writing the query as you have, you would change it to:
    SELECT SDO_GEOM.RELATE
    (A.geographical_coordinates,
    C.DIMINFO,
    'DETERMINE',
    B.geographical_coordinates,
    C.DIMINFO) relationship
    FROM MAP_INDEX A,
    MAP_INDEX B,
    USER_SDO_GEOM_METADATA C
    WHERE A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULL
    and C.TABLE_NAME='MAP_INDEX'
    and C.COLUMN_NAME='GEOGRAPHICAL_COORDINATES';
    So either of those should fix the problem you are seeing, but neither of those are the best way to accomplish what you want to do.
    If I were you I would follow first set of directions (migrate your data), make sure I have a spatial index on my table:
    select index_name
    from user_sdo_index_info
    where table_name='MAP_INDEX';
    If no rows are returned, create the index:
    create index MAP_INDEX_SIDX on MAP_INDEX(GEOGRAPHICAL_COORDINATES)
    indextype is mdsys.spatial_index;
    You could use SDO_JOIN to perform a self-join:
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28400/sdo_operat.htm#BGEDJIBF
    using the EQUAL mask. Note the section on optimizing self-joins.
    If you don't have too much data, this might be a start to doing what you want:
    create table dups_rowids as
    select /*+ ordered */ a.rowid rowid1,b.rowid rowid2
    from MAP_INDEX A,
    MAP_INDEX B
    where SDO_EQUALS (a.geographical_coordinates,b.geographical_coordinates)='TRUE'
    and a.rowid <> b.rowid;
    create table nodup_rowid (noduprid VARCHAR2(24));
    create table dup_rowid (duprid VARCHAR2(24));
    set serveroutput on;
    declare
    rowida varchar2(24);
    rowidb varchar2(24);
    rowidt varchar2(24);
    type myCursor is ref cursor;
    acursor myCursor;
    cursor c1 is select rowid1,rowid2 from dups_rowids;
    begin
    for r in c1 loop
    rowida := r.rowid1;
    rowidb := r.rowid2;
    rowidt := NULL;
    open acursor for 'select duprid from dup_rowid where duprid = :rowida' using rowida;
    fetch acursor into rowidt;
    if rowidt is null
    then
    execute immediate 'insert into nodup_rowid values (:rowida)' using rowida;
    execute immediate 'insert into dup_rowid values (:rowida)' using rowida;
    execute immediate 'commit';
    end if;
    close acursor;
    rowidt := NULL;
    open acursor for 'select duprid from dup_rowid where duprid = :rowidb' using rowidb;
    fetch acursor into rowidt;
    if rowidt is null
    then
    execute immediate 'insert into dup_rowid values (:rowidb)' using rowidb;
    execute immediate 'commit';
    end if;
    close acursor;
    end loop;
    end;
    Then your final table would have the geometries from the original table that had no match:
    create table MAP_INDEX_NODUPS
    as select * from MAP_INDEX where rownum < 1;
    insert into MAP_INDEX_NODUPS
    (select *
    from MAP_INDEX
    where ROWID not in
    (select ROWID1 from DUPS_ROWIDS));
    plus only one of the geometries that were equal:
    insert into MAP_INDEX_NODUPS
    (select *
    from MAP_INDEX
    where ROWID in
    (select ROWID1 from NODUP_ROWID);
    Hope this helps.

  • ORA-01428: argument '-1' is out of range

    hi
      here is the details: -
    Select walkin_id, applying_for from walkins where walkin_id =197
    WALKIN_ID     APPLYING_FOR
    197             CLASS1:CLASS2:OTHER /*stored colon seprated classification*/
    Select program_id, program_name, classification from ss_programs
    PROGRAM_ID     PROGRAM_NAME     CLASSIFICATION
    1             PG1                         CLASS1
    2             PG2                         CLASS1
    3             PG3                         CLASS3
    4             PG4                         CLASS1
    5             PG5                         CLASS1
    6             PG6                         CLASS1
    7             PG7                         CLASS1
    8             PG8                         CLASS1
    9             PG9                         CLASS1
    10             PG10                     CLASS2
    11             PG11                    CLASS2
    12             PG12                     CLASS3
    13             PG13                     CLASS1
    14             PG14                     CLASS1
    15             PG15                    CLASS1
    16             PG16                     CLASS1
    17             PG17                     CLASS1
    18             OTHER                     OTHER
    now i wanted to extract all the program_ids belongs to the  walkins.applying_for (colon seprated ss_programs.classification) and
    rebuild them into colon separated list
    like if
    walkins.applying_for is :  CLASS1:CLASS2:OTHER then the
    program_list would be : PG1:PG2:PG4:PG5:PG6:PG7:PG8:PG9:PG10:PG11:PG13:PG14:PG15:PG16:PG17:OTHER
    and for this i build the following query and its giving me
    "ORA-01428: argument '-1' is out of range" error and i am stucked.
    So could you please tell me where i am doing wrong
    and can we do this with SQL like below specified query or some other (SQL) way.
    SELECT SUBSTR (LTRIM(MAX (SYS_CONNECT_BY_PATH (program_id, ':')) KEEP (DENSE_RANK LAST ORDER BY curr),
                    ':'), 2) programs
    FROM               
    (SELECT walkin_id, program_id,
           row_number() over (partition by 1 order by program_id) curr,
           row_number() over (partition by 1 order by program_id)-1 prev
    FROM      
    (SELECT wp.walkin_id, sp.program_id
    FROM SS_PROGRAMS sp,
        (SELECT walkin_id, substr(val, decode(level, 1, 1, INSTR(val, ':', 1, LEVEL -1)+1),
               INSTR(val, ':', 1, level) - decode(level, 1, 1, INSTR(val, ':', 1, LEVEL -1)+1)) walkin_classif
           FROM      
           (SELECT walkin_id, DECODE(SUBSTR(applying_for, -1, 1), ':', applying_for, applying_for||':') val FROM walkins
        WHERE walkin_id =197)
        CONNECT BY INSTR(val, ':', 1, LEVEL) > 0) wp
    WHERE sp.classification = wp.walkin_classif))
    GROUP BY walkin_id
    CONNECT BY prev = PRIOR curr AND walkin_id = PRIOR walkin_id
            START WITH curr = 1;

    And if you want it to work for more than 1 walkin at the same time:
    SQL> create table walkins (walkin_id, applying_for)
      2  as
      3  select 197, 'CLASS1:CLASS2:OTHER' from dual union all
      4  select 198, null from dual union all
      5  select 199, 'CLASS4' from dual union all
      6  select 200, 'CLASS3:CLASS1' from dual
      7  /
    Table created.
    SQL> create table ss_programs (program_id, program_name, classification)
      2  as
      3  select 1, 'PG1', 'CLASS1' from dual union all
      4  select 2, 'PG2', 'CLASS1' from dual union all
      5  select 3, 'PG3', 'CLASS3' from dual union all
      6  select 4, 'PG4', 'CLASS1' from dual union all
      7  select 5, 'PG5', 'CLASS1' from dual union all
      8  select 6, 'PG6', 'CLASS1' from dual union all
      9  select 7, 'PG7', 'CLASS1' from dual union all
    10  select 8, 'PG8', 'CLASS1' from dual union all
    11  select 9, 'PG9', 'CLASS1' from dual union all
    12  select 10, 'PG10', 'CLASS2' from dual union all
    13  select 11, 'PG11', 'CLASS2' from dual union all
    14  select 12, 'PG12', 'CLASS3' from dual union all
    15  select 13, 'PG13', 'CLASS1' from dual union all
    16  select 14, 'PG14', 'CLASS1' from dual union all
    17  select 15, 'PG15', 'CLASS1' from dual union all
    18  select 16, 'PG16', 'CLASS1' from dual union all
    19  select 17, 'PG17', 'CLASS1' from dual union all
    20  select 18, 'OTHER', 'OTHER' from dual
    21  /
    Table created.
    SQL> with walkins_normalized as
      2  ( select walkin_id
      3         , substr
      4           ( ':' || applying_for || ':'
      5           , instr(':' || applying_for || ':',':',1,l) + 1
      6           , instr(':' || applying_for || ':',':',1,l+1) - instr(':' || applying_for || ':',':',1,l) -1
      7           ) applying_for_element
      8      from walkins w
      9         , ( select level l
    10               from ( select max(length(applying_for) - length(replace(applying_for,':')))+1 maxn
    11                        from walkins
    12                    )
    13            connect by level <= maxn
    14           ) m
    15     where l <= length(applying_for) - length(replace(applying_for,':'))+1
    16  )
    17  , string_aggregated as
    18  ( select walkin_id
    19         , rtrim(pl,':') program_list
    20         , rn
    21      from walkins_normalized w
    22         , ss_programs p
    23     where w.applying_for_element = p.classification
    24     model
    25           partition by (w.walkin_id)
    26           dimension by (row_number() over (partition by w.walkin_id order by p.program_id) rn)
    27           measures (cast(p.program_name as varchar2(100)) pl)
    28           rules
    29           ( pl[any] order by rn desc = pl[cv()] || ':' || pl[cv()+1]
    30           )
    31  )
    32  select walkin_id
    33       , program_list
    34    from string_aggregated
    35   where rn = 1
    36  /
    WALKIN_ID PROGRAM_LIST
           197 PG1:PG2:PG4:PG5:PG6:PG7:PG8:PG9:PG10:PG11:PG13:PG14:PG15:PG16:PG17:OTHER
           200 PG1:PG2:PG3:PG4:PG5:PG6:PG7:PG8:PG9:PG12:PG13:PG14:PG15:PG16:PG17
    2 rows selected.And by the way, you should think of redesigning your walkins table to something normalized...
    Regards,
    Rob.

  • Getting error while creating form and report on webservice: ORA-20001: Unable to create form on table. ORA-02263: need to specify the datatype for this column.

    i am using the following description to create a web service reference:
    web reference :REST
    Name :Yahoo Map
    URL :http://local.yahooapis.com/MapsService/V1/mapImage
    HTTP Method: GET
    Basic Authentication: No
    Add Parameter:
    Name       Type
    appid        String
    location    String
    Output Format: XML
    XPath to Output Parameters : /Result
    Output Parameter:
    Name       Path       Type
    Url          /text()      String
    Then i tried to create form and report on webservice:
    Web Service Reference Type: Yahoo Map
    Operation: doREST
    All the fields i keep as default
    I tick the checkbox (url)in report Parameter
    After clicking next whereever required i click create button
    I get the following error
    ORA-20001: Unable to create form on table. ORA-02263: need to specify the datatype for this column.
    Please someone help to solve this as i need to fix it urgently.

    i exported the application from apex.oracle.com and imported it to our environment
    import went fine, but when I ran the IR page I got
    ORA-20001: get_dbms_sql_cursor error ORA-00904: : invalid identifier
    evidently the problem is a lack of public execute on DBMS_LOB, which is used in the generated IR source.
    while waiting for the DBA to grant privs on DBMS_LOB, changing the dbms_lob.getlength call to length() fixes the IR.
    however, i am not getting the download link on the associated form page... changed templates, that's not the issue -- we'll see if that's a dbms_lob issue as well

  • APEX:Getting error while creating form and report on webservice: ORA-20001: Unable to create form on table. ORA-02263: need to specify the datatype for this column.

    I am using Apex 4.2.2.00.11
    am using the following description to create a web service reference:
    web reference :REST
    Name :Yahoo Map
    URL :http://local.yahooapis.com/MapsService/V1/mapImage
    HTTP Method: GET
    Basic Authentication: No
    Add Parameter:
    Name       Type
    appid        String
    location    String
    Output Format: XML
    XPath to Output Parameters : /Result
    Output Parameter:
    Name       Path       Type
    Url          /text()      String
    Then i tried to create form and report on webservice:
    Web Service Reference Type: Yahoo Map
    Operation: doREST
    All the fields i keep as default
    I tick the checkbox (url)in report Parameter
    After clicking next whereever required i click create button
    I get the following error
    ORA-20001: Unable to create form on table. ORA-02263: need to specify the datatype for this column.
    Please someone help to solve this as i need to fix it urgently.

    336554,
    Looks like there is a 127-column limit on the number of report columns supported when using that wizard. Do you have more than that?
    57434

  • OUTER JOIN -- Error: ORA-01417  (a table may be outer joined to at most one

    Hi there,
    I have a rather simple task: retrieve all the records in a table, for agiven domain p_domain_id (input parameter). The problem is that there are about 6 FKs in the table, and I need the names (strings) corresponding to those FKs (from other tables). Unfortunately, some of the FKs are NULL, so in '=' I loose records. Without the last 2 lines in WHERE clause, I get the correct result. With d2 in place (and without the "(+)" ) I loose 2 records. With the d3 (and also without "(+)"), I do not get any record.
    With the "(+)", the code compiles but I get the run time error ORA-01417
    NOTE: I put the "+" within parentheses, in order to show it like a text in this editor.
    What's an elegant solution to this?
    Thanks a lot.
    Here's the code:
    SELECT
    a.DOMAIN,
    b.NAME,
    a.DE_ID,
    a.NAME,
    a.PREFERRED_LABEL,
    a.TECHNICAL_DEFINITION,
    a.PUBLIC_DEFINITION,
    a.DE_TYPE,
    c1.NAME,
    a.HAS_PARAMETER,
    a.VALUE_CLASS,
    c2.NAME,
    a.INDEX_TERMS,
    a.DATA_TABLE_ID,
    d1.TABLE_NAME,
    a.SP_INSERT,
    a.SP_UPDATE,
    a.SP_GET_BYMRN,
    a.SP_GET_BYATTRIBUTE,
    a.VALUE_TABLE_ID,
    d2.TABLE_NAME,
    a.PARAM_TABLE_ID,
    d3.TABLE_NAME,
    a.PARAM_DOMAIN_LOGIC,
    a.SP_LOV,
    a.LOWER_LIMIT,
    a.UPPER_LIMIT,
    a.BOOLEAN_Y,
    a.BOOLEAN_N,
    a.COMMENTS,
    a.ENTERED_BY,
    commons_API.get_person_full_name(a.ENTERED_BY),
    a.ENTERED_ON
    FROM
    DATA_ELEMENT_INDEX a,
    DE_DOMAIN b,
    GENERAL_LIST c1,
    GENERAL_LIST c2,
    TABLE_GROUP d1,
    TABLE_GROUP d2,
    TABLE_GROUP d3
    WHERE
    DOMAIN = p_domain_id AND
    b.DOMAIN_ID = a.DOMAIN AND
    c1.ID = a.DE_TYPE AND
    c2.ID = a.VALUE_CLASS AND
    d1.TABLE_ID = a.DATA_TABLE_ID AND -- it works well without the next two lines
    d2.TABLE_ID = a.VALUE_TABLE_ID "(+)" AND
    d3.TABLE_ID = a.PARAM_TABLE_ID "(+)"
    ORDER BY a.NAME;
    Edited by: user10817976 on Oct 19, 2009 8:14 AM

    One of my standard replies...
    Oracle syntax does not support outer joining to more than one table.
    However ANSI syntax does...
    SQL> select * from a;
            ID      B_KEY      C_KEY
             1          2          3
             2          1          4
             3          3          1
             4          4          2
    SQL> select * from b;
            ID     C_KEY2
             1          1
             2          5
             3          3
             4          2
    SQL> select * from c;
          KEY1       KEY2 DTA
             1          1 1-1
             1          2 1-2
             1          3 1-3
             1          4 1-4
             2          1 2-1
             2          2 2-2
             2          3 2-3
             2          4 2-4
             3          1 3-1
             3          2 3-2
             3          3 3-3
             3          4 3-4
             4          1 4-1
             4          2 4-2
             4          3 4-3
             4          4 4-4
    16 rows selected.
    SQL> ed
    Wrote file afiedt.buf
      1  select a.id as a_id, b.id as b_id, c.key1 as c_key1, c.key2 as c_key3, c.dta
      2  from a, b, c
      3  where a.b_key = b.id
      4  and   a.c_key = c.key1 (+)
      5* and   b.c_key2 = c.key2 (+)
    SQL> /
    and   a.c_key = c.key1 (+)
    ERROR at line 4:
    ORA-01417: a table may be outer joined to at most one other table
    SQL> ed
    Wrote file afiedt.buf
      1  select a.id as a_id, b.id as b_id, c.key1 as c_key1, c.key2 as c_key3, c.dta
      2  from a JOIN b ON (a.b_key = b.id)
      3*        LEFT OUTER JOIN c ON (a.c_key = c.key1 and b.c_key2 = c.key2)
    SQL> /
          A_ID       B_ID     C_KEY1     C_KEY3 DTA
             3          3          1          3 1-3
             4          4          2          2 2-2
             2          1          4          1 4-1
             1          2
    SQL>

  • REP-1401 Fatal PL/SQL error occur ORA-06502 numeric or value error

    Hi,
    I am getting following error in reports 6i
    REP-1401 Fatal PL/SQL error occur ORA-06502 numeric or value error.
    I have added a formula column based on other formula column
    function CF_1FORMULA0005 return varchar2 is
    CF_CREDIT varchar2(38);
    begin
    :CF_CREDIT:= :D_CARRY_F_CR+:D_HD_SUM_REP_CR;
    RETURN (:CF_CREDIT);
    end;
    Oracle Standard formula coulmn:
    function D_CARRY_F_DRFormula return VARCHAR2 is
    l_dr VARCHAR2(38);
    l_dr_disp VARCHAR2(38);
    begin
    SRW.REFERENCE(:C_FUNC_CURRENCY);
    SRW.REFERENCE(:C_CARRY_F_DR);
    if (:C_CARRY_F_DR = 0) THEN
    ax_globe_package.g_dr_cf := TRUE;
    --l_dr:= '0.00';
    l_dr_disp := '0.00';
    l_dr := ax_currency_pkg.display_char(:C_FUNC_CURRENCY,l_dr_disp,38);
    else
    -- return(ax_currency_pkg.display_char(:C_FUNC_CURRENCY,:C_CARRY_F_DR,ax_page_pkg.f_maxlength));
    -- Bug2239881. Setting the carried forward totals.
    IF (:P_GLOBAL_ATTR_CAT = 'JE.GR.GLXSTBKS.BOOKS' AND ax_globe_package.g_dr_cf = FALSE) THEN
    ax_globe_package.g_dr_cf := TRUE;
    ax_globe_package.g_dr_total := :C_CARRY_F_DR;
    END IF;
    srw.message(999,'G_DR_TOTAL = ' || ax_globe_package.g_dr_total );
    l_dr := ax_currency_pkg.display_char(:C_FUNC_CURRENCY,to_char(ax_globe_package.g_dr_total),38);
    /*select to_number(l_dr, '999G999G999G999G990D00')
    into l_dr_disp
    from dual;
    end if;
    srw.message(999,'l_dr = ' || l_dr );
    return l_dr;
    --return ltrim(to_char(l_dr_disp,'999G999G999G999G990D00','nls_numeric_characters=,.'));
    end;
    both formula column return types are character.Please help me ASAP.
    Thanks,
    sriharsha.

    Hi,
    First of all: when you should use concatenation operator (||) instead of plus sign when working with strings. So, instead of
    :CF_CREDIT:= :D_CARRY_F_CR+:D_HD_SUM_REP_CR; you should use
    :CF_CREDIT:= :D_CARRY_F_CR||:D_HD_SUM_REP_CR; If :D_CARRY_F_CR and :D_HD_SUM_REP_CR are both numbers then consider to use to_char function before you assign value to :CF_CREDIT.
    I wonder, why your CF's returns varchar's if they operates on numbers?
    regards
    kikolus
    Edited by: kikolus on 2012-11-30 08:03

  • ORA-06502:Numeric or value error ORA-01403: No data found --6502

    Dear All
    I am using Forms 10g.
    I am calling a report from my form.
    but when i am calling then it is showing this error:
    ORA-06502:Numeric or value error ORA-01403: No data found --6502
    My code is in Print Button :
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    plid ParamList;
    vParamValue number;
    BEGIN
    plid := Get_parameter_List('tmp');
    IF NOT Id_Null(plid) THEN
    Destroy_parameter_List( plid );
    END IF;
    plid := Create_parameter_List('tmp');
    Add_Parameter(PLid, 'P_Block', Text_Parameter, :block_query.item_block);
    Add_Parameter(PLid, 'P_Category', Text_Parameter, :block_query.item_category);
    Add_Parameter(PLid, 'P_Dept', Text_Parameter, :block_query.item_dept);
    Add_Parameter(PLid, 'P_sub_Category', Text_Parameter, :block_query.item_sub_category);
    Add_Parameter(PLid, 'P_FLOOR', Text_Parameter, :block_query.item_floor);
    Add_Parameter(PLid, 'P_IP', Text_Parameter, :block_query.item_ip);
    Add_Parameter(PLid, 'P_Room', Text_Parameter, :block_query.item_room);
    Add_Parameter(PLid, 'P_Userid', Text_Parameter, :block_query.item_usr_id);
    Add_Parameter(PLid, 'PARAMFORM', Text_Parameter, 'NO');
    repid := FIND_REPORT_OBJECT('rp_report');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,cache);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER, 'paramform=no');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_oracleapps_eHOpeAS');
    v_rep := RUN_REPORT_OBJECT(repid,plid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')      
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?
    '||'server=rep_oracleapps_eHOpeAS');
    Exception
         When others then
         message(Sqlerrm||'-'||sqlcode);
    End;
    Edited by: Sandip Mohapatra on Feb 8, 2010 12:44 AM

    hi
    u can write for all no problem.
    here is an example please modify it with u r requirements.
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    plid ParamList;
    vParamValue number;
    BEGIN
    plid := Get_parameter_List('tmp');
    IF NOT Id_Null(plid) THEN
    Destroy_parameter_List( plid );
    END IF;
    plid := Create_parameter_List('tmp');
    add_parameter(plid,'P_code',text_parameter,to_char(:hr.employee_code));
    add_parameter(plid,'P_name',text_parameter,to_char(:hr.name));
    add_parameter(plid,'P_fname',text_parameter,to_char(:hr.fname));
    add_parameter(plid,'P_gender',text_parameter,to_char(:hr.gender));
    add_parameter(plid,'P_married',text_parameter,to_char(:hr.marital_status));
    add_parameter(plid,'P_job',text_parameter,to_char(:hr.job));
    add_parameter(plid,'P_sal',text_parameter,to_char(:hr.sal));
    add_parameter(plid,'P_dob',text_parameter,to_char(:hr.dob));
    add_parameter(plid,'P_country',text_parameter,to_char(:hr.country));
    add_parameter(plid,'P_nationality',text_parameter,to_char(:hr.nationality));
    add_parameter(plid,'P_address',text_parameter,to_char(:hr.address));
    add_parameter(plid,'p_imagecode',text_parameter,to_char(:images.employee_code));
    Add_parameter(plid, 'PARAMFORM', TEXT_parameter, 'NO');
    repid := FIND_REPORT_OBJECT('REPORT6');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,cache);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
    SET_APPLICATION_PROPERTY(CURSOR_STYLE,'NORMAL');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER, 'paramform=no');
    v_rep := RUN_REPORT_OBJECT(repid,plid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    /*Display report in the browser*/
    WEB.SHOW_DOCUMENT('http://sarah:8890/reports/rwservlet/getjobid'||
    substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver&P_code='||:hr.employee_code||'&P_name'
    ||:hr.name ||'&P_fname'|| :hr.fname  ||'&P_gender'||:hr.gender||'&P_married'||:hr.marital_status||'&P_job'||:hr.job||'&P_sal'||:hr.sal||'&P_dob'||:hr.dob||
    '&p_country'||:hr.country||'&p_natioanlity'||:hr.nationality||'&p_address'||:hr.address||'&p_image'||:images.employee_code||'&paramform=no','_SELF');
    END;sarah

Maybe you are looking for

  • How to put data into a RFC import parameter structure from portal

    Hi, All, I have a RFC in which an import parameter is a structure (not a table). I want to put data into that structure. I know how to put data into a table or a string. I tried to use IRecordSet MyTABStr = (IRecordSet)structureFactory.getStructure(f

  • Internet Connect crash/Software Update won't open

    I have a 500mhz G3 slot loading iMac running 10.3.9 About 2 weeks ago, after waking FrankenMac up from sleep mode, I noticed the Airport status symbol failed to appear in the menu bar (next to the volume/date&time etc). Looking into my Network settin

  • Issue: Flash radio buttons & Php form

    I have a flash form which all of the fields are sending correctly through the php code. The flash radio buttons I added with the groupname == topic, doesnt send with the rest of the information that is being sent to the email. My question is how do I

  • Photos are not sycning in order to iPhone

    I recently uploaded photos to my iPhone for the first time. I made separate folders with photos in a specific order, and then synced with my phone. Once it was done, I looked up the photos on my iPhone and they were in a completely different order. I

  • How to test multiple Resource connection in sun Idm

    Hi, I am configuring 1000+ servers by importing one resource.xml file in IDM. The resources are added in the resource list in IDM. But i want to check the connectivity of each resource. Is there any procedure to check the connectivity of all resource