ORA-01722 error, when doing a WHERE numcol IN (:P2_LIST_OF_NUMS) statement

Hi,
I'm trying to create a flash pie chart in APEX 3.0 and hit problems which seems to come down to my where clause.
It appears that the :P2_LIST_OF_NUMS is not being converted correctly when I have more than one comma separated value in P2_LIST_OF_NUMS, it works fine with just one number.
Tried this in SQL Developer entering 81,67 as my bind
select sum(trmcnvcnt) from lstcpnsum where cpnidd1 in(&P2_LIST_OF_NUMS);
worked fine
Hard coded my select in APEX
select sum(trmcnvcnt) from lstcpnsum where cpnidd1 in(81,67);
worked fine
But in APEX when I try to do it passing the values from a text field P2_LIST_OF_NUMS that contains 81,67 as
select sum(trmcnvcnt) from lstcpnsum where cpnidd1 in(:P2_LIST_OF_NUMS);
I get the ORA-01722: invalid number error.
Works fine when P2_LIST_OF_NUMS only contains 81.
I thought that the value of P2_LIST_OF_NUMS would just be substitued into the sql statement and then ran.
Have I missed something here?
Thanks
Rich

Rich,
If the context permits it you might be able to specify &P2_LIST_OF_NUMS. (don't forget the period) in your SQL but a bind variable definitely will not work. For a discussion about why that is and some alternate approaches, see: Re: Search on a typed in list of values
Scott

Similar Messages

  • Why am I getting an ORA-04052 error when I try to compile a Procedure?

    Hi,
    The following procedure I'm getting an ORA-04052 error when I try to compile the following procedure.
    CREATE OR REPLACE PROCEDURE APPS.Find_String (
    pin_referenced_name IN dba_dependencies.referenced_name%TYPE)
    IS
    cursor cur_get_dependancy
    is
    SELECT distinct owner, name, type
      FROM [email protected]        -- prod.world
    WHERE lower(referenced_name) = lower(pin_referenced_name) --'ftbv_salesrep_all_1d'
       AND referenced_type <> 'SYNONYM'
       AND owner <> 'SYS'
    order by name;
    v_owner  varchar2(40);
    v_name   varchar2(50);
    v_type   varchar2(40);
        BEGIN
           dbms_output.put_line(upper(pin_referenced_name)||' is found in the following objects.');
           dbms_output.put_line(' ');
           dbms_output.put_line(RPAD('OWNER', 30, ' ')||RPAD('NAME', 60, ' ')||RPAD('OBJECT TYPE', 30, ' '));
           dbms_output.put_line('-------------------------------------------------------------------------------------------------------------------');
            FOR i IN cur_get_dependancy
            LOOP
                v_owner := RPAD(i.owner, 30, ' ');
                v_name  := RPAD(i.name, 45, ' ');
                v_type  := RPAD(i.type, 30, ' ');
                dbms_output.put_line(v_owner ||v_name|| v_type);
            END LOOP;
    END find_string;I'm using the link [email protected]. The procedure compiles for other database links used in the cursor including the one commented to the right of the code 'prod.world'.
    What's even stranger is that I took the SELECT statement
    SELECT distinct owner, name, type
      FROM [email protected]        -- prod.world
    WHERE lower(referenced_name) = lower(pin_referenced_name) --'ftbv_salesrep_all_1d'
       AND referenced_type <> 'SYNONYM'
       AND owner <> 'SYS'
    order by name;out of the procedure and ran it on the command line using the @pinp.world link, the SQL statement ran just fine. But when I tried to compile the above procedure with that exact same SQL statement with the exact same link I get the following string of errors.
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02068: following severe error from PINP
    ORA-03113: end-of-file on communication channelHow can the link work just fine in a regular SQL statement but then cause an error when its compiled in code that otherwise compile just fine when using any other link or even just a plain database. Does anyone have any suggestions?

    OK Justin,
    Here's the query by itself run in another database using the @pinp.world link and querying the dba_dependencies table in the pinp.world database. As you can see the query using this link works just fine returning the requested rows. I can't figure out why the compiler is having an issue with essentially this same query when I try to compile it in a cursor in TOAD. Also this is the database (dev1.world) that I'm trying to compile this Procedure in.
    By the way I'm in an Oracle 9.2.0.6 database and TOAD v9.2.
    SQL> conn apps/apps1@dev1
    Connected.
    SQL> SELECT distinct owner, name, type
      2    FROM [email protected]
      3   WHERE lower(referenced_name) = lower('ALL_USERS')
      4     AND referenced_type <> 'SYNONYM'
      5     AND owner <> 'SYS'
      6   order by name;
    OWNER                          NAME                           TYPE
    PUBLIC                         ALL_USERS                      SYNONYM
    XDB                            DBMS_XDBUTIL_INT               PACKAGE BODY
    XDB                            DBMS_XDBZ0                     PACKAGE BODY
    SYSTEM                         MVIEW_EVALUATIONS              VIEW
    SYSTEM                         MVIEW_EXCEPTIONS               VIEW
    SYSTEM                         MVIEW_FILTER                   VIEW
    SYSTEM                         MVIEW_LOG                      VIEW
    SYSTEM                         MVIEW_RECOMMENDATIONS          VIEW
    SYSTEM                         MVIEW_WORKLOAD                 VIEW
    ORASSO                         WWCTX_API                      PACKAGE BODY
    PORTAL                         WWCTX_API                      PACKAGE BODY
    ORASSO                         WWEXP_UTL                      PACKAGE BODY
    PORTAL                         WWEXP_UTL                      PACKAGE BODY
    PORTAL                         WWPOB_API_PAGE                 PACKAGE BODY
    PORTAL                         WWPOF                          PACKAGE BODY
    ORASSO                         WWPRO_PROVIDER_VALIDATION      PACKAGE BODY
    PORTAL                         WWPRO_PROVIDER_VALIDATION      PACKAGE BODY
    PORTAL                         WWSBR_EDIT_ATTRIBUTE           PACKAGE BODY
    PORTAL                         WWSBR_FOLDER_PORTLET           PACKAGE BODY
    PORTAL                         WWSBR_USER_PAGES_PORTLET       PACKAGE BODY
    ORASSO                         WWUTL_API_PARSE                PACKAGE BODY
    OWNER                          NAME                           TYPE
    PORTAL                         WWUTL_API_PARSE                PACKAGE BODY
    PORTAL                         WWUTL_EXPORT_IMPORT_LOV        PACKAGE BODY
    ORASSO                         WWUTL_LOV                      PACKAGE BODY
    PORTAL                         WWUTL_LOV                      PACKAGE BODY
    PORTAL                         WWV_CONTEXT                    PACKAGE BODY
    PORTAL                         WWV_CONTEXT_UTIL               PACKAGE BODY
    PORTAL                         WWV_DDL                        PACKAGE BODY
    PORTAL                         WWV_GENERATE_UTL               PACKAGE BODY
    PORTAL                         WWV_GLOBAL                     PACKAGE
    PORTAL                         WWV_MONITOR_DATABASE           PACKAGE BODY
    PORTAL                         WWV_PARSE_AS_SPECIFIC_USER     PACKAGE BODY
    PORTAL                         WWV_PARSE_AS_USER              PACKAGE BODY
    PORTAL                         WWV_SYS_DML                    PACKAGE BODY
    PORTAL                         WWV_SYS_RENDER_HIERARCHY       PACKAGE BODY
    PORTAL                         WWV_THINGSAVE                  PACKAGE BODY
    PORTAL                         WWV_UTIL                       PACKAGE BODY
    PORTAL                         WWV_UTLVALID                   PACKAGE BODY
    38 rows selected.
    SQL>Let me know what you think.
    Thanks again.

  • Pipelined function with Union clause(Invalid Number(ORA-01722) error )

    Hi,
    I have a pipelined function.
    I am fetching the data with the use of a REF cursor.
    The query has two part: query1 and query2
    when I am opeing the cursor with query1 UNION query2,it is giving me Invalid Number(ORA-01722) error.
    but when I open the cursor separately for query1 and query2,I am getting the resultset for each of the query.
    query1 and query2 are running fine with UNION in the sql editor.
    But,when I put them into two variables (var1 :='query1' and var2:='query2' and try to open the cursor with var1 UNION var2 , it's giving me the error.
    But when I put query2 as 'Select ..... from dual' and then try to open the cursor for query1 UNION query2,
    then getting the result of query1 and one extra row for query2(dual).
    The FROM table set is same for query1 and query2..
    can anyone please help me , why this Invalid Number(ORA-01722) error is coming.

    query1 := 'SELECT to_char(st.store_no) STORE_NUMBER,pp.name PROGRAM_NAME, ''HBS'' DISPENSING_SYSTEM,
    pt.PATIENT_SRC_NO SOURCE_ID, null RX2000_PATIENT_IDENTIFIER, pt.last_name PATIENT_LAST_NAME, pt.first_name
    PATIENT_FIRST_NAME, to_char(LPAD (pppd.rx_number, 7, '' '')|| ''-''|| LPAD (pppd.refill_number, 2, 0)) RX_REFILL
    FROM
    pega_patient_program_dispense pppd,pega_patient_program_reg pppr,health_care_profs hcp1,
    health_care_profs hcp2,prescription_dispenses pd,prescriptions p, pega_program_status_reason ppsr ,master_doctors md,
    prescription_disp_orders pdo, hbs_shipment_extract hse,stores st,master_stores ms,pega_programs pp,patients pt,master_patients mpt
    WHERE
    pppr.referring_hcp_id=md.id(+) and md.dispensing_system_id=hcp1.hcp_id and
    pppr.ID=pppd.PEGA_PATIENT_PROGRAM_REG_ID and pppd.prescription_dispense_id=pd.id and pd.prescriptions_id=p.id and
    p.hcp_id=hcp2.hcp_id and ppsr.ID=pppd.PEGA_PROGRAM_STATUS_REASON_ID and pppd.prescription_dispense_id = pdo.prescriptions_dispenses_id(+) AND
    pdo.shipment_number = hse.shp_no(+) and pppd.store_id=ms.id and st.id=ms.dispensing_system_id and pppr.pega_program_id=pp.id
    and pppr.patient_id=mpt.id and pt.patient_id=mpt.dispensing_system_id and pppd.dispensing_system=''HBS'' and pp.name LIKE ''REV%''
    AND
    ((pppd.prescription_dispense_id IS NOT NULL AND pppd.quantity_dispensed &gt; 0 AND pppd.reported_date IS NULL AND
    pppd.src_delete_date IS NULL AND ((pppr.program_specific_patient_code IS NULL ) OR (hcp1.last_name IS NULL) OR
    (hcp1.first_name IS NULL) OR (hcp2.first_name IS NULL) OR (hcp2.last_name IS NULL) OR (hcp2.address_1 IS NULL) OR
    (hcp2.city IS NULL) OR (hcp2.state_cd IS NULL) OR (hcp2.zip_1 IS NULL)OR (pppr.referral_date is NULL) OR
    (hcp1.state_cd IS NULL) OR (hcp1.zip_1 IS NULL)
    OR (hcp2.zip_1 IS NULL) OR (pppr.last_status_change_date IS NULL) OR (pppr.varchar_1 IS NULL) OR
    (pppr.varchar_7 IS NULL OR pppr.varchar_7 LIKE ''NOT AVAILABLE AT REFERRAL%'') OR (pppr.varchar_5 IS NULL OR
    pppr.varchar_5 LIKE ''NOT AVAILABLE AT REFERRAL%'')) ) AND ppsr.INCLUDE_ON_EXCEPTION_RPT_IND=''Y'')
    OR
    ((pppd.authorization_number IS NULL OR NVL(TRUNC(pdo.shipped_date),TRUNC(hse.shp_act_date_dt)) NOT BETWEEN
    TRUNC(pppd.date_1) AND TRUNC(pppd.date_2)) OR (pppd.varchar_4 IS NULL OR NVL(TRUNC(pdo.shipped_date),
    TRUNC(hse.shp_act_date_dt)) NOT BETWEEN TRUNC(pppd.date_3) AND TRUNC(pppd.date_5)))
    OR
    (pppr.pega_program_competitors_id IS NULL AND (ppsr.manufacturer_status=''TRIAGE'' AND ppsr.manufacturer_reason=''COMPETITOR''))
    OR
    (ppsr.manufacturer_reason IS NULL)
    query2 := ' SELECT ''150'' STORE_NUMBER,''test'' PROGRAM_NAME , ''RX2000'' DISPENSING_SYSTEM
    ,''01'' SOURCE_ID, null RX2000_PATIENT_IDENTIFIER, ''test'' PATIENT_LAST_NAME, ''test'' PATIENT_FIRST_NAME,
    ''rx01'' RX_REFILL
    FROM
    pega_patient_program_reg pppr,health_care_profs hcp1, pega_program_status_reason ppsr ,
    master_doctors md,stores st,master_stores ms,pega_programs pp,patients pt,master_patients mpt
    WHERE
    pppr.referring_hcp_id=md.id(+) and md.dispensing_system_id=hcp1.hcp_id and
    ppsr.ID=pppr.REFERRAL_STATUS_ID and st.store_type=''M'' and pppr.store_id=ms.id and st.id=ms.dispensing_system_id
    and pppr.pega_program_id=pp.id and pppr.patient_id=mpt.id and pt.patient_id=mpt.dispensing_system_id and pp.name LIKE ''REV%''
    AND
    ((((pppr.program_specific_patient_code IS NULL ) OR (hcp1.last_name IS NULL) OR (hcp1.first_name IS NULL) OR
    (pppr.referral_date is NULL) OR (hcp1.state_cd IS NULL) OR (hcp1.zip_1 IS NULL) OR (pppr.last_status_change_date IS NULL)
    OR (pppr.varchar_1 IS NULL) OR (pppr.varchar_7 IS NULL) OR (pppr.varchar_5 IS NULL OR pppr.varchar_5 LIKE
    ''NOT AVAILABLE AT REFERRAL%'')) ) AND ppsr.INCLUDE_ON_EXCEPTION_RPT_IND=''Y'')
    OR
    (pppr.pega_program_competitors_id IS NULL AND (ppsr.manufacturer_status=''TRIAGE'' AND ppsr.manufacturer_reason=''COMPETITOR''))
    OR
    (ppsr.manufacturer_reason IS NULL)
    AND
    pppr.id NOT IN(select pppd.PEGA_PATIENT_PROGRAM_REG_ID from PEGA_PATIENT_PROGRAM_DISPENSE pppd)';
    BUT IF I put
    query2 := ' SELECT ''150'' STORE_NUMBER,''test'' PROGRAM_NAME , ''RX2000'' DISPENSING_SYSTEM
    ,''01'' SOURCE_ID, null RX2000_PATIENT_IDENTIFIER, ''test'' PATIENT_LAST_NAME, ''test'' PATIENT_FIRST_NAME,
    ''rx01'' RX_REFILL
    FROM DUAL';
    then it is giving result.

  • ORA-22813 error when deleting spatial objects in LIVE

    Hi,
    We are getting an ORA-22813 error when attempting to delete a spatial object from a version-enabled table in workspace LIVE. The spatial object to be removed has a SDO type of multipolygon. The geometry information consists of 4 rings with a combined ordinate count of 4120. The statement used to delete the row is:
    delete from tableA where tableA.id in (select tableA.id from tableA where tableA.id = 3);
    The error occurs only on a 10g R1 Oracle instance (10.1.0.5.0) with Workspace Manager version 10.1.0.7.1. The delete operation succeeds without problems on a 10g R2 (10.2.0.2.0) instance with Workspace Manager version 10.2.0.3.1. The statement is also executed successfully on the 10g R1 instance if the table is not version-enabled.
    Any help on this would be appreciated.
    Thanks

    Hi,
    I would recommend filing a TAR in this one. The only ora-22813 error involving workspace manager and geometry columns that I know about involves queries that need to sort data for which the size of the geometry column was >30k. Does the execution plan for the delete statement involve any kind of sort? However, this is an old 9.2 bug, that I believe was fixed for all 10.1 and newer releases.
    Does the same error happen if you do not use the subquery?
    Regards,
    Ben

  • ORA-12514 Error when using Net Configuration Assistant

    I have recently installed Oracle 11g on a Windows 2008 server and am now trying to connect via the Oracle client on my local machine.
    Here is how I've been using Net Configuration Assistant so far:
    Listener Configuration
    The name of my listener is LISTENER_PROXIMA (proxima is the name of the server). Does this need to be named something else? Something specific?
    I'm using TCP to connect.
    I'm using standard port 1521.
    Naming Methods
    Local Naming and Easy Connect Naming
    Local Net Service Name
    Service name is ADMI04 (checked this against the lsnrstl service status on the server and it's correct)
    Using TCP
    Using the hostname proxima.domain-name.com
    I'm attempting to connect as SYS (but have tried others with the same result)
    When I go to test the connection I keep getting the ORA-12514 error. Does anyone know what I should do? Reinstall the listener? If so, are there any suggestions or guidance for that?
    Thank you.

    =================================
    A couple of important points.
    First, the listener is a server side only process. It's entire purpose in life is to receive requests for connections to databases and set up those connections. Once the connection is established, the listener is out of the picture. It creates the connection. It doesn't sustain the connection. One listener, with the default name of LISTENER, running from one oracle home, listening on a single port, will serve multiple database instances of multiple versions running from multiple homes. It is an unnecessary complexity to try to have multiple listeners or to name the listener as if it belongs to a particular database. That would be like the telephone company building a separate switchboard for each customer.
    Second, the tnsnames.ora file is a client side issue. It's purpose is for address resolution - the tns equivalent of the 'hosts' file further down the network stack. The only reason it exists on a host machine is because that machine can also run client processes.
    Assume you have the following in your tnsnames.ora:
    larry =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = curley)
      )Now, when you issue a connect, say like this:
    $> sqlplus scott/tiger@larrytns will look in your tnsnames.ora for an entry called 'larry'. Next, tns sends a request to (PORT = 1521) on (HOST = myhost) using (PROTOCOL = TCP), asking for a connection to (SERVICE_NAME = curley).
    Where is (HOST = myhost) on the network? When the request gets passed from tns to the next layer in the network stack, the name 'myhost' will get resolved to an IP address, either via a local 'hosts' file, via DNS, or possibly other less used mechanisms. You can also hard-code the ip address (HOST = 123.456.789.101) in the tnsnames.ora.
    Next, the request arrives at port 1521 on myhost. Hopefully, there is a listener on myhost configured to listen on port 1521, and that listener knows about SERVICE_NAME = curley. If so, you'll be connected.
    What can go wrong?
    First, there may not be an entry for 'larry' in your tnsnames. In that case you get "ORA-12154: TNS:could not resolve the connect identifier specified" No need to go looking for a problem on the host, with the listener, etc. If you can't place a telephone call because you don't know the number (can't find your telephone directory (tnsnames.ora) or can't find the party you are looking for listed in it (no entry for larry)) you don't look for problems at the telephone switchboard.
    Maybe the entry for larry was found, but myhost couldn't be resolved to an IP address (say there was no entry for myhost in the local hosts file). This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe there was an entry for myserver in the local hosts file, but it specified a bad IP address. This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe the IP was good, but there is no listener running: "ORA-12541: TNS:no listener"
    Maybe the IP was good, there is a listener at myhost, but it is listening on a different port. "ORA-12560: TNS:protocol adapter error"
    Maybe the IP was good, there is a listener at myhost, it is listening on the specified port, but doesn't know about SERVICE_NAME = curley. "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"
    =====================================

  • ORA-0907 error when querying XMLDB Table using XMLExists

    Hi All,
    Get ORA-00907 error when trying to use XMLExists:
    SELECT *
    FROM tnmab_agreement_xml_binary A
    WHERE
    ( XMLExists('declare default element namespace "http://com.oocl.schema.tnm.agreementbuilder"; $XML/Agreement/ShippingPartyGroups/ShippingParties/CustomerHolder[SAP_ID="$ARG"]')
    passing agreements.AGREEMENT_XML as "XML", '5000003001' as "ARG")
    OR
    ( XMLExists('declare default element namespace "http://com.oocl.schema.tnm.agreementbuilder"; $XML/Agreement/NamedCustomerGroups/NamedCustomer/SAP_IDs/StringWrappers[Value="$ARG"]')
    passing agreements.AGREEMENT_XML as "XML", '5000003001' as "ARG")
    ORA-00907: missing right parenthesis
    *00907. 00000 - "missing right parenthesis"*
    **Cause:*
    **Action:*
    Error at Line: 6 Column: 176
    Any help is appreciated
    Thanks
    Auro

    XMLExists('declare default element namespace "http://com.oocl.schema.tnm.agreementbuilder"; $XML/Agreement/ShippingPartyGroups/ShippingParties/CustomerHolder[SAP_ID="$ARG"]'
    passing agreements.AGREEMENT_XML as "XML", '5000003001' as "ARG")no ')' after the closing quote

  • Ora 12154 error when trying to add a database to VS Server Explorer

    Hi Everyone,
    I get the Ora 12154 error when trying to add a database to VS Server Explorer.
    How do I get around this problem.
    The database service is running and I can connect to the database with pl/sql.
    I can also tnsping the database and that is also ok.
    Looks like a problem with the odp.net software.
    I am running the 32 bit Oracle 11g on a Windows7 Home Premium 64 bit PC.
    I am new to this stuff so please help me step by step.
    Thanks.
    Emad

    Hi J. B.
    I have a question related to this. After you told me about the //host:1521/database alias I tried it in a VB 2008 program and it worked and returned data. At least I know that it can be used in a VB program without issues. I just now need to be able to add a connection with the Server Explorer.
    Anyway here is the VB coding I used. I'm new to this and still learning:
    Imports Oracle.DataAccess.Client ' Visual Basic ODP.NET Oracle managed provider
    Public Class Form1
    ' String to connect to the database.
    Dim strConnectionString As String = _
    "Data Source=//emad-pc:1521/emadeva;User ID=scott;Password=tiger;" '
    ' Associate the connection string with a connection object.
    Dim objOracleConnection As New OracleConnection(strConnectionString)
    ' SQL query for returning data rows.
    Dim strSqlQuery As String = _
    "Select dname, deptno " & _
    "From dept " & _
    "Where deptno = 10" '
    ' Command object to make this query work.
    Dim objOracleCommand As New OracleCommand(strSqlQuery, objOracleConnection)
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    ' Identify what type of command is being used.
    objOracleCommand.CommandType = CommandType.Text
    Try
    objOracleConnection.Open()
    ' Set up a Data Reader and load it with data.
    Dim objOracleDataReader As OracleDataReader = _
    objOracleCommand.ExecuteReader()
    objOracleDataReader.Read()
    ' Convert the department number to a string.
    lblDepartmentNumberFromOracle.Text = _
    CStr(objOracleDataReader.Item("deptno"))
    Catch ex As Exception
    MessageBox.Show(ex.Message, "Error")
    End Try
    End Sub
    End Class
    I still want to thank you for the help you are providing.
    Truly,
    Emad

  • ORA-1722 ERROR WHEN SELECTING MFG_LOOKUPS TABLE

    제품 : AOL
    작성날짜 : 2003-04-07
    ORA-1722 ERROR WHEN SELECTING MFG_LOOKUPS TABLE.
    ================================================
    PURPOSE
    Problem Description
    sqlplus 에서 mfg_lookups table을 select할때,
    ORA-1722 Invalid number 에러발생
    Workaround
    Solution Description
    =======================================================
    CREATE OR REPLACE VIEW mfg_lookups(
    lookup_type,
    lookup_code,
    meaning,
    description,
    enabled_flag,
    start_date_active,
    end_date_active,
    created_by,
    creation_date,
    last_update_date,
    last_updated_by,
    last_update_login
    AS
    SELECT lv.lookup_type,
    TO_NUMBER(lv.lookup_code) lookup_code, <==== Wrong code!!!
    lv.meaning,
    lv.description,
    lv.enabled_flag,
    lv.start_date_active,
    lv.end_date_active,
    lv.created_by,
    lv.creation_date,
    lv.last_update_date,
    lv.last_updated_by,
    lv.last_update_login
    FROM fnd_lookup_values lv
    WHERE lv.LANGUAGE = USERENV('LANG') AND
    lv.view_application_id = 700 AND
    lv.security_group_id =
    fnd_global.lookup_security_group(lv.lookup_type,
    lv.view_application_id)
    =================================================================
    MFG_LOOKUPS 은 view로 fnd_lookup_values의 lookup_code값을 가지고 오는
    방식이나, to_number로 변환하게 되어 있어 숫자가 아닌 문자의 경우
    이와 같은 에러를 발생한다.
    이번 경우, 고객이 새로 등록한 Lookup code였고, code값을 숫자의 format으로
    다시 등록하니 해결됨.
    Reference Documents
    -------------------

    Yes but this is a regular operation and the INSERT is the only opportunity.
    BTW, look at what else I have just found:
    INSERT INTO Local_Table (a, b)SELECT col1, col2 FROM DUAL INNER JOIN Table1@remote ON (1=1) LEFT JOIN Table2@remote ON (...)
    OK.

  • ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http

    I am getting error message ORA-28868 error when calling Web service over HTTPS from PL/SQL utl_http PL/SQL package,
    when browsed through some of the messages they point to setting Oracle Wallet Manager.
    I am trying to connect
    Any idea on how to resolve this issue ?
    your input is appreciated.
    Thanks
    Ravi

    Duplicate post ... please ignore.

  • ORA-00054 error when loading Oracle table using Data Services

    Hello,
    we are facing ORA-00054 error when loading Oracle table using BO Data services
    (Oracle 10g database, BODS Xi 3.2 SP3)
    Test Job performs
    1- truncate table
    2- load table (tested in standard and bulk load modes)
    Scenario when issue happens is:
    1- Run loading Job
    2- Job end in error for any Oracle data base error
    3- When re-running the same Job, Job fails with following error
         ORA-00054: resource busy and acquire with NOWAIT specified
    It seems after first failure, Oracle session for loading the table stays active and locks the table.
    To be able to rerun the Job, we are forced need to kill Oracle session manually to be able to run the Job again.
    Expected behaviour would be : on error rollback modifications made on table and BODS stops Oracle session in a clean way.
    Can somebody tell me / or point me to any BODS best practice about Oracle error handling to prevent such case?
    Thanks in advance
    Paul-Marie

    the ora-0054 can occure depending how the job failed before. If this occures you will need the DBA to release the lock on the table in question
    Or
           AL_Engine.exe on The server it creates the Lock. Need to Kill Them. Or stop it..
    This Problem Occurs when we select The Bulkloading Option in orclae  We also faced the same issue,Our admin has Killed the session. Then everything alright.

  • ORA-03115 error when calling a Stored Procedure

    Hi All,
    I'm in the process of porting a Pro/C app from NT to Linux. I've installed 8.1.5 on our Linux box and patched it up to 8.1.5.02.
    It all kind of works ok, except that I'm sometimes getting ORA-03115 errors when the app calls a stored procedure. The call in question looks like this:
    EXEC SQL BEGIN DECLARE SECTION;
    VARCHAR resprows[50][3998];
    int numret = 0;
    int numrows= 50;
    int done= 0;
    unsigned long resp_id = 0;
    EXEC SQL END DECLARE SECTION;
    EXEC SQL AT DB_NAME EXECUTE
    BEGIN pkg_something.getdata(
    :resp_id, /* IN */
    :numrows, /* IN */
    :done, /* OUT */
    :resprows, /* OUT */
    :numret /* OUT */
    END;
    END-EXEC;
    The stored procedure basically uses the resp_id value to select rows from a table;
    in each row there is a VARCHAR2(4000) column which it copies into the hostarray resprows.
    There may be anything from 1 to numrows returned from the SP.
    Initially, the resprows rows were defined to be size [4000]. Unfortunately, this caused ORA-02005 errors - I then changed the size to [3998], which seemed to fix the 02005's (although I'm unclear as to the reasons why).
    Now I'm getting the 03115 errors when calling the SP. The oracle manual is not very helpful on what this error means.
    This all works chipper on NT.
    Any ideas?
    Thanks in advance,
    Nigel.
    PS: The database the app is talking to is still hosted on NT.
    null

    Histon FTM wrote:
    ORA-04063: package body "LAZARUS.LAZARUS" has errors Above, obviously conflicts with the statement that follows:
    >
    The procedure and package have both compiled without errors and the statement on its own works fine in SQL*Plus.I suggest you take a look in the USER_ERRORS view to see, what the errors are.
    And just checking:
    You have schema called LAZARUS, which holds a package named LAZARUS, which holds a procedure called POPULATEGRIDPOSITIONS?
    Edited by: Toon Koppelaars on Oct 1, 2009 5:55 PM

  • ORA-04062 error when running forms with different users

    ORA-04062 error when running forms with different users
    I have a form that has a block that should display some data from another users tables. (The other user's name is dynamic, it's selected from a list box)
    I wrote a stored procedure to get the data from other user's tables.
    When I compile the form and run it with the same user I compiled, it works without any error. But when I run the compiled form with another user I get the ORA-04062 (signature of procedure has been changed) error.
    I tried setting REMOTE_DEPENDENCIES_MODE to SIGNATURE in init.ora but it didn't help.
    My Forms version is 6i with Patch 15.
    Database version is 9.
    Here is my stored procedure:
    TYPE Scenario_Tab IS TABLE OF NUMBER(34) INDEX BY BINARY INTEGER;
    TYPE Open_Curs IS REF CURSOR;
    PROCEDURE Get_Scenarios(User_Name IN VARCHAR2, Scen_Table OUT Scenario_Tab) IS
    Curs Open_Curs;
    i NUMBER;
    BEGIN
    OPEN Curs FOR
    'SELECT Seq_No FROM '|| User_Name ||'.scenario';
    i := 1;
    LOOP
    FETCH Curs INTO Scen_Table(i);
    EXIT WHEN Curs%NOTFOUND;
    i := i + 1;
    END LOOP;
    END Get_Senarios;
    I would be happy to solve this problem. It's really important.
    Maybe somebody can tell me another way to do what I want to do. (getting a list of values from another users tables)

    I think it should be a better solution to create a package,
    and put your own TYPES and procedure into it.
    CREATE OR REPLACE PACKAGE PKG_XXX IS
    TYPE TYP_TAB_CHAR IS TABLE OF .... ;
    PROCEDURE P_XX ( Var1 IN VARCHAR2, var2 IN OUT TYP_TAB_CHAR );
    END ;
    Then in your Form :
    Declare
    var PKG_XXX.TYP_TAB_CHAR ;
    Begin
    PKG_XXX.P_XX( 'user_name', var ) ;
    End ;

  • ORA-01031 Error When starting Database

    I have installed Oracle 11gr2 on my laptop having OS ubuntu 10.04, after installation i am receiving ORA-01031 error when try to log in with the command
    sqlplus / as sysdba what should i do to resolve it...

    Hi,
    there are a lot of possibilities why this can be wrong. Look at Oracle Support for note 233223.1, "Checklist for Resolving CONNECT AS SYSDBA (INTERNAL) Issues". This gives links to notes which leads you to maybe the solution.
    Possibilities are:
    - you are root, which is not allowed. You should connect with the oracle user
    - your user is not part of the dba group
    - permissions on files
    - and many more
    Herald ten Dam
    http://htendam.wordpress.com

  • TS1702 I got this error when doing a restore

    I got this error when doing a restore and the restrictions were turned on .  I disabled restrictions and the restore was able to complete.

    The error in itunes had a link to http://support.apple.com/kb/TS1702.  I placed this message here for anyone that might navigate to the same message and would hopefully find this.  Yes turning off restrictions allowed the restore to complete and everyone is now happy.

  • ORA-907 ERROR WHEN IMPORT (COMMENT 처리)

    제품 : ORACLE SERVER
    작성날짜 : 1997-10-15
    ORA-907 ERROR WHEN IMPORT (COMMENT 처리)
    ========================================
    ORA-907: missing right parenthesis error
    이 error 는 export 한 table 을 create 시 comment 를 사용한 경우 발생하는 ORACLE error 이다.
    이는 version 8.0.4 에서 fix 되었다.
    이를 해결하기 위해서는 미리 table create script 를 돌려 temp_table 을
    create 하십시오.
    이 때 comment 를 모두 뺀 상태로 create 한다. 또는 /* */ 는 괜찮다.
    이후 INSERT INTO temp_table select * from original_table ;
    을 실행합니다.
    즉 original_table 을 temp_table 로 copy 한 후
    drop table original_table;
    rename temp_table to original_table ;
    을 한 후 table을 다시 export해서 다른 machine으로 import한다.
    또 이 -- 를 없애는 방법으로 아래의 C program을 이용할 수 있다.
    /* file name : cnvt_dmp.c
    * This program is to covert double dash remark expression
    * C language stype remark expression.
    #include <stdio.h>
    #define MAXWORDS 4
    char s_reserve[4][100]={ "NOT NULL", "CONSTRAINTS",")",","};
    int dash2remark();
    void main(argc,argv)
    int argc;
    char *argv[];
    FILE f_in, f_out;
    int i,j,lreserve;
    int chr1,chr2;
    char str1[100],str2[100],str3[100];
    if( argc != 3 ) {
    printf(" usage : cnvt_dmp infile.dmp outfile.dmp \n");
    exit(0);
    if( (f_in = fopen(argv[1],"r")) == NULL ) {
    printf("could't open the source file.: %s\n",argv[1]);
    exit(0);
    if( (f_out = fopen(argv[2],"w")) == NULL ) {
    printf("대상화일을 생성할 수가 없습니다.\n");
    exit(0);
    j = i = 0;
    while( (chr1 = fgetc(f_in)) != EOF && !ferror(f_in)) {
    if( chr1 == 'D' ) {
    str1[0]='D';
    fputc(chr1, f_out) ;
    for(i=1;i<7;i++) {
    chr1 = fgetc(f_in);
    str1[i] = chr1;
    fputc(chr1, f_out) ;
    str1[7] = 0;
    strcpy( str2,"DEFAULT");
    if ( strcmp( "DEFAULT",str1) == 0 ) {
    lreserve = 0;
              i =0;
    while( (chr2 = fgetc(f_in))!= ','){
    if ( chr2 == ')') break;
    str2[i] = chr2;
    if ( chr2 == '-' )
    lreserve = 1;
              i++;
    str2[i] = chr2;
    str2[i+1] = 0;
    printf(" lreserv => %d, str2=>%s\n",lreserve,str2);
    if (lreserve) {
    dash2remark(f_in,f_out,str2);
    else {
    for( i=0;i<strlen(str2);i++) fputc(str2,f_out);
    else {
    fputc(chr1, f_out );
    fclose(f_out);
    fclose(f_in);
    return;
    int dash2remark( f_in,f_out,str)
    FILE f_in,f_out;
    char *str;
    int i,j,start_pos=-1,end_pos=-1;
    for( i=0; i < strlen(str); i++ ) {
    if ( str[i] == '-') {
    start_pos = i;
    for( j =0 ; j < MAXWORDS; j++){
    if (strncmp(s_reserve[j],str+i,strlen(s_reserve[j]))== 0){
    end_pos = i;
    if ( start_pos > 0 ) {
    for(i=0;i< (start_pos-1); i++)
    fputc( str[i],f_out);
    fputc('/',f_out); fputc('*',f_out);
    for(i =i+2;i<(end_pos-1);i++)
    fputc(str[i],f_out);
    fputc('*',f_out); fputc('/',f_out);fputc(' ',f_out);
    for(i;i<strlen(str);i++)
    fputc(str[i],f_out);
    else {
    for(i=0;i<strlen(str);i++)
    fputc(str[i],f_out);
    return(1);
    이상입니다.

    Hi, i think that the problem is around the rollback segments.The solution is bring other rollback segments ONLINE state, if not exist others rollbackup,then you need create the other rollback segments and bring online state.
    If you need more information, you will must see the next DOC-ID on Metalink site,
    Note:121971.1
    Luck.
    Have a good day.
    Regards.

Maybe you are looking for