Getting EQP-80407 & ORA-00918 error in SES query

Hi,
We are using SES to implement Third party search and created a new data source of type "Database" to crawl the external db. when we start the scheduler to crawl the db, getting the following error:
EQP-80407: Exception while processing document: ORA-00918: column ambiguously defined
Here is the query used while creating the datasource:
SELECT 'SWERowId0='||SR.ROW_ID||''AS URL,SR.ROW_ID AS KEY, 'en' AS LANG,SR.LAST_UPD AS LASTMODIFIEDDATE,'SR#: ' ||SR.SR_NUM || CHR(13) || 'Asset Business Segment: '||O.NAME || CHR(13) || 'Installed At Customer Short Name: ' ||OX.ATTRIB_07 || CHR(13) ||'Dispatch To Last Name: ' ||CON.LAST_NAME || CHR(13) || 'Version: ' ||SRX.ATTRIB_07 || CHR(13) || 'Asset Description: ' ||ASS.DESC_TEXT || CHR(13) ||'Short Description: ' ||SR.X_GEHC_IITS_SHORT_DESCRIPTION || CHR(13) || 'Status: ' ||SR.SR_STAT_ID || CHR(13)|| 'Responsible Queue: ' ||USR.LOGIN || CHR(13) || 'Created Date: ' ||SR.X_GEHC_IITS_CREATED || CHR(13) || 'Resolution: '||SR.X_RESOLUTION || CHR(13) || 'SPR ID: ' ||SRX.ATTRIB_41|| CHR(13) || 'Type: ' ||SR.SR_CAT_TYPE_CD || CHR(13) || 'SubType: ' ||SR.SR_SUBTYPE_CD || CHR(13) || 'Description:
'||SR.DESC_TEXT || CHR(13) || 'Actual Problem: '|| SR.X_ACTUAL_PROBLEM || CHR(13) || 'Owner Last Name: '|| emp.LAST_NAME || CHR(13) || CHR(13) || 'Action: ' ||ACT.SUBTYPE_CD || CHR(13) || 'Type: ' ||ACT.TODO_CD || CHR(13) || 'Status: ' ||ACT.EVT_STAT_CD || CHR(13) || 'Comments: '||ACT.COMMENTS_LONG || CHR(13) ||CHR(13) ||CHR(13) || 'SR#: ' ||SR.SR_NUM || CHR(13) || 'Customer Name: ' ||ORG.NAME || CHR(13) || 'Created Date/Time: '||ACT.X_GEHC_IITS_CREATED || CHR(13) || 'Last Updated Date/Time: '||ACT.LAST_UPD || CHR(13)|| 'Asset Business Segment: '||O.NAME || CHR(13) || 'Asset Description: ' ||ASS.DESC_TEXT || CHR(13) || 'Version: ' ||SRX.ATTRIB_07 || CHR(13) || 'Responsible Queue: ' ||USR.LOGIN ||CHR(13) || 'Customer Short Name: '||OX.ATTRIB_07 || CHR(13) || 'SR Owner First Name: ' ||emp.FST_NAME || CHR(13) || 'SR Owner Last Name: '||emp.LAST_NAME || CHR(13) || 'Customer Contact: ' ||CON3.LAST_NAME|| CHR(13) || 'Owner Last Name: ' ||CON4.LAST_NAME as CONTENT,
'SR #:' ||SR.SR_NUM || ' - ' || 'Activity#: ' ||ACT.ACTIVITY_UID as title,
SR.SR_NUM as SR#,
O.NAME as ASSETBUSINESSSEGMENT,
OX.ATTRIB_07 as INSTALLEDATCUSTOMERSHORTNAME,
CON.LAST_NAME as DISPATCHTOLASTNAME,
SRX.ATTRIB_07 as VERSION,
SR.SR_STAT_ID as SRSTATUS,
USR.LOGIN as RESPONSIBLEQUEUE,
SR.X_GEHC_IITS_CREATED as CREATEDDATE,
ASS.DESC_TEXT as ASSETDESCRIPTION,
SR.X_GEHC_IITS_SHORT_DESCRIPTION as SHORTDESCRIPTION,
emp.LAST_NAME as OWNERLASTNAME,
CON2.LAST_NAME as CONTACTLASTNAME,
SR.LAST_UPD as LASTEDITEDUPDATEDDATE,
ACT.EVT_STAT_CD as ACTIVITYSTATUS,
ACT.X_GEHC_IITS_CREATED as CREATEDDATETIME,
ACT.LAST_UPD as LASTUPDATEDDATETIME,
CON3.LAST_NAME as CUSTOMERCONTACT,
CON4.LAST_NAME as OWNERLASTNAME
FROM SIEBEL.S_SRV_REQ SR,SIEBEL.S_ASSET ASS,SIEBEL.S_ORG_EXT O,SIEBEL.S_ORG_EXT_X OX,SIEBEL.S_CONTACT CON,SIEBEL.S_CONTACT emp,SIEBEL.S_SRV_REQ_X SRX,SIEBEL.S_CONTACT CON2,SIEBEL.S_USER USR,SIEBEL.S_EVT_ACT ACT,SIEBEL.S_CONTACT CON3,SIEBEL.S_CONTACT CON4 ,SIEBEL.S_ORG_EXT ORG,SIEBEL.S_ACT_CONTACT CONACT WHERE SR.ASSET_ID = ASS.ROW_ID(+) AND ASS.BU_ID = O.PAR_ROW_ID(+) AND SR.CST_OU_ID=OX.PAR_ROW_ID(+) AND SR.X_DISPATCH_ID=CON.PAR_ROW_ID(+) AND SR.OWNER_EMP_ID=EMP.PAR_ROW_ID(+) AND SR.ROW_ID=SRX.PAR_ROW_ID(+) AND SR.CST_CON_ID=CON2.PAR_ROW_ID(+) AND SR.X_GEHC_IITS_QUEUE_OWNER = USR.ROW_ID(+) AND SR.ROW_ID = ACT .SRA_SR_ID(+) AND ACT.OWNER_PER_ID = CON4.PAR_ROW_ID(+) AND SR.CST_OU_ID = ORG.PAR_ROW_ID(+) AND ACT.ROW_ID = CONACT.ACTIVITY_ID(+) AND CONACT.CON_ID = CON3.ROW_ID(+) and SR.LAST_UPD >= to_date('10/14/2011','MM/DD/YYYY')
Here is the snippet of the crawler log:
06:05:21:307 INFO     filter_0          Queueing URL:http://iits-web-dev-01.am.health.ge.com:10091/emedical_enu/start.swe?SWECmd=GotoView&SWEView=Defects+Detail&SWERF=1&SWEBU=1&SWEApplet0=Product+Defect+Detail+Form+Applet&SWERowId0=1-2PDOEF, key:1-2PDOEF, lastmod:2011-10-13T06:25:09
06:05:21:314 DEBUG     filter_1     JdbcDocumentQueueManager          batch dequeue(ms): 6 (5678859)
06:05:21:314 INFO     filter_1          Dequeued http://iits-web-dev-01.am.health.ge.com:10091/emedical_enu/start.swe?SWECmd=GotoView&SWEView=Defects+Detail&SWERF=1&SWEBU=1&SWEApplet0=Product+Defect+Detail+Form+Applet&SWERowId0=1-2PDOEF
06:05:21:314 DEBUG     filter_1          Access url is http://foo?key=1-2PDOEF&lastmod=2011-10-13T06:25:09 KEYVAL is 1-2PDOEF
06:05:21:314 DEBUG     filter_0     JdbcDocumentQueueManager          existing Query(ms):0
06:05:21:320 FATAL     filter_1          EQP-80407: Exception while processing document: ORA-00918: column ambiguously defined
06:05:21:320 FATAL     filter_1     ORA-00918: column ambiguously defined
java.sql.SQLException     oracle.jdbc.driver.DatabaseError:throwSqlException:125     oracle.jdbc.driver.T4CTTIoer:processError:316     oracle.jdbc.driver.T4CTTIoer:processError:282     oracle.jdbc.driver.T4C8Oall:receive:639     oracle.jdbc.driver.T4CPreparedStatement:doOall8:185     oracle.jdbc.driver.T4CPreparedStatement:execute_for_describe:503     oracle.jdbc.driver.OracleStatement:execute_maybe_describe:965     oracle.jdbc.driver.T4CPreparedStatement:execute_maybe_describe:535     oracle.jdbc.driver.OracleStatement:doExecuteWithTimeout:1051     oracle.jdbc.driver.OraclePreparedStatement:executeInternal:2984     oracle.jdbc.driver.OraclePreparedStatement:executeQuery:3026     oracle.search.plugin.appsjdbc.AppsJdbcPlugin:processDocuments:1084     oracle.search.plugin.appsjdbc.AppsJdbcPlugin:crawl:1456     oracle.search.crawler.CrawlingThread:run:1578
We are using LAST_NAME column at diffrenet places in the query from S_CONTACT table using different joins. when I run the same query in SQL, not getting any error as we are using different join aliases.This is happening only when I use the same query to crawl the data in SES datasource.
Any help on this would be highly appreciated.

Hi Roger,
Query format: SELECT * FROM (< your query >) WHERE KEY=<value>
Can you please tell me what could be the value for "KEY=<value>"
I have executed the query in SQL*Plus,as per the format as follows by passing sample row id of one record as KEY, but getting the Column ambiguity error.
SELECT * FROM (SELECT 'SWERowId0='||SR.ROW_ID||''AS URL,SR.ROW_ID AS KEY, 'en' AS LANG,SR.LAST_UPD AS LASTMODIFIEDDATE,'SR#: ' ||SR.SR_NUM || CHR(13) || 'Asset Business Segment: '||O.NAME || CHR(13) || 'Installed At Customer Short Name: ' ||OX.ATTRIB_07 || CHR(13) || 'Dispatch To Last Name: ' ||CON.LAST_NAME || CHR(13) || 'Version: ' ||SRX.ATTRIB_07 || CHR(13) || 'Asset Description: ' ||ASS.DESC_TEXT || CHR(13) || 'Short Description: ' ||SR.X_GEHC_IITS_SHORT_DESCRIPTION || CHR(13) || 'Status: ' ||SR.SR_STAT_ID || CHR(13) || 'Responsible Queue: ' ||USR.LOGIN || CHR(13) || 'Created Date: ' ||SR.X_GEHC_IITS_CREATED || CHR(13) || 'Resolution: '||SR.X_RESOLUTION || CHR(13) || 'SPR ID: ' ||SRX.ATTRIB_41|| CHR(13) || 'Type: ' ||SR.SR_CAT_TYPE_CD || CHR(13) || 'SubType: ' ||SR.SR_SUBTYPE_CD || CHR(13) || 'Description: '||SR.DESC_TEXT || CHR(13) || 'Actual Problem: '|| SR.X_ACTUAL_PROBLEM || CHR(13) || 'Owner Last Name: '|| emp.LAST_NAME || CHR(13) || CHR(13) || 'Action: ' ||ACT.SUBTYPE_CD || CHR(13) || 'Type: ' ||ACT.TODO_CD || CHR(13) || 'Status: ' ||ACT.EVT_STAT_CD || CHR(13) || 'Comments: '||ACT.COMMENTS_LONG || CHR(13) ||CHR(13) ||CHR(13) || 'SR#: ' ||SR.SR_NUM || CHR(13) || 'Customer Name: ' ||ORG.NAME || CHR(13) || 'Created Date/Time: '||ACT.X_GEHC_IITS_CREATED || CHR(13) || 'Last Updated Date/Time: '||ACT.LAST_UPD || CHR(13) || 'Asset Business Segment: '||O.NAME || CHR(13) || 'Asset Description: ' ||ASS.DESC_TEXT || CHR(13) || 'Version: ' ||SRX.ATTRIB_07 || CHR(13) || 'Responsible Queue: ' ||USR.LOGIN || CHR(13) || 'Customer Short Name: '||OX.ATTRIB_07 || CHR(13) || 'SR Owner First Name: ' ||emp.FST_NAME || CHR(13) || 'SR Owner Last Name: ' ||emp.LAST_NAME || CHR(13) || 'Customer Contact: ' ||CON3.LAST_NAME|| CHR(13) || 'Owner Last Name: ' ||CON4.LAST_NAME as CONTENT,'SR #:' ||SR.SR_NUM || ' - ' || 'Activity#: ' ||ACT.ACTIVITY_UID as title,SR.SR_NUM as SR#,O.NAME as ASSETBUSINESSSEGMENT,OX.ATTRIB_07 as INSTALLEDATCUSTOMERSHORTNAME,CON.LAST_NAME as DISPATCHTOLASTNAME,SRX.ATTRIB_07 as VERSION,SR.SR_STAT_ID as SRSTATUS,USR.LOGIN as RESPONSIBLEQUEUE,SR.X_GEHC_IITS_CREATED as CREATEDDATE,ASS.DESC_TEXT as ASSETDESCRIPTION,SR.X_GEHC_IITS_SHORT_DESCRIPTION as SHORTDESCRIPTION,emp.LAST_NAME as OWNERLASTNAME,CON2.LAST_NAME as CONTACTLASTNAME,SR.LAST_UPD as LASTEDITEDUPDATEDDATE,ACT.EVT_STAT_CD as ACTIVITYSTATUS,ACT.X_GEHC_IITS_CREATED as CREATEDDATETIME,ACT.LAST_UPD as LASTUPDATEDDATETIME,CON3.LAST_NAME as CUSTOMERCONTACT,CON4.LAST_NAME as OWNERLASTNAME FROM SIEBEL.S_SRV_REQ SR,SIEBEL.S_ASSET ASS,SIEBEL.S_ORG_EXT O,SIEBEL.S_ORG_EXT_X OX,SIEBEL.S_CONTACT CON,SIEBEL.S_CONTACT emp,SIEBEL.S_SRV_REQ_X SRX,SIEBEL.S_CONTACT CON2,SIEBEL.S_USER USR,SIEBEL.S_EVT_ACT ACT,SIEBEL.S_CONTACT CON3,SIEBEL.S_CONTACT CON4 ,SIEBEL.S_ORG_EXT ORG,SIEBEL.S_ACT_CONTACT CONACT WHERE SR.ASSET_ID = ASS.ROW_ID(+) AND ASS.BU_ID = O.PAR_ROW_ID(+) AND SR.CST_OU_ID=OX.PAR_ROW_ID(+) AND SR.X_DISPATCH_ID=CON.PAR_ROW_ID(+) AND SR.OWNER_EMP_ID=EMP.PAR_ROW_ID(+) AND SR.ROW_ID=SRX.PAR_ROW_ID(+) AND SR.CST_CON_ID=CON2.PAR_ROW_ID(+) AND SR.X_GEHC_IITS_QUEUE_OWNER = USR.ROW_ID(+) AND SR.ROW_ID = ACT .SRA_SR_ID(+) AND ACT.OWNER_PER_ID = CON4.PAR_ROW_ID(+) AND SR.CST_OU_ID = ORG.PAR_ROW_ID(+) AND ACT.ROW_ID = CONACT.ACTIVITY_ID(+) AND CONACT.CON_ID = CON3.ROW_ID(+)) WHERE KEY='1-1MCO39'
Please help me.
Thanks
Sandeep

Similar Messages

  • Why having ORA-24344 error on my query?

    There are two tables one is sectors_main and emp_rem_view table. I don't know why i am having ORA-24344 error?
    Can anyone tell me why?
    SELECT
    ms_id, COUNT(*) cnt,
    NVL(ROUND(percentile_cont(0.25) within group (order by base_salary),0),0) bs_q1
    FROM (SELECT SECTORS_MAIN_ID,emp_id,base_salary,FAR,TAR,TR FROM EMP_REM_VIEW WHERE job_title_id=44) e,
    SECTORS_MAIN s
    WHERE s.ms_id = e.SECTORS_MAIN_ID (+)
    GROUP BY ms_id
    The funny things is from below query. if the recodes of the tmp table are less than 24 rows, then I can get a result, but if the rows are more than 24, i am having the same error as the above query.
    WITH tmp AS(
    select 123 ms_id FROM dual UNION ALL
    select 129 ms_id FROM dual UNION ALL
    select 100 ms_id FROM dual UNION ALL
    select 121 ms_id FROM dual UNION ALL
    select 128 ms_id FROM dual UNION ALL
    select 120 ms_id FROM dual UNION ALL
    select 132 ms_id FROM dual UNION ALL
    select 108 ms_id FROM dual UNION ALL
    select 102 ms_id FROM dual UNION ALL
    select 119 ms_id FROM dual UNION ALL
    select 117 ms_id FROM dual UNION ALL
    select 125 ms_id FROM dual UNION ALL
    select 101 ms_id FROM dual UNION ALL
    select 107 ms_id FROM dual UNION ALL
    select 130 ms_id FROM dual UNION ALL
    select 131 ms_id FROM dual UNION ALL
    select 104 ms_id FROM dual UNION ALL
    select 105 ms_id FROM dual UNION ALL
    select 109 ms_id FROM dual UNION ALL
    select 124 ms_id FROM dual UNION ALL
    select 122 ms_id FROM dual UNION ALL
    select 106 ms_id FROM dual UNION ALL
    select 118 ms_id FROM dual UNION ALL
    select 126 ms_id FROM dual
    SELECT
    ms_id, COUNT(*) cnt
    ,NVL(ROUND(percentile_cont(0.25) within group (order by base_salary),0),0) bs_q1
    FROM (SELECT SECTORS_MAIN_ID,emp_id,base_salary,FAR,TAR,TR FROM EMP_REM_VIEW WHERE job_title_id=44) e,
    tmp s
    where s.ms_id = e.SECTORS_MAIN_ID (+)
    GROUP BY ms_id
    Edited by: 870226 on Jul 4, 2011 11:10 PM

    this is one of examples, the below query is working only if the tmp table has no more then 24 rows, i am now looking at the limitation of join now if there is such a things in there, but the below query is not working on my oracle 11g r2
    WITH tmp AS(
    select 123 ms_id FROM dual UNION ALL
    select 129 ms_id FROM dual UNION ALL
    select 100 ms_id FROM dual UNION ALL
    select 121 ms_id FROM dual UNION ALL
    select 128 ms_id FROM dual UNION ALL
    select 120 ms_id FROM dual UNION ALL
    select 132 ms_id FROM dual UNION ALL
    select 108 ms_id FROM dual UNION ALL
    select 102 ms_id FROM dual UNION ALL
    select 119 ms_id FROM dual UNION ALL
    select 117 ms_id FROM dual UNION ALL
    select 125 ms_id FROM dual UNION ALL
    select 101 ms_id FROM dual UNION ALL
    select 107 ms_id FROM dual UNION ALL
    select 130 ms_id FROM dual UNION ALL
    select 131 ms_id FROM dual UNION ALL
    select 104 ms_id FROM dual UNION ALL
    select 105 ms_id FROM dual UNION ALL
    select 109 ms_id FROM dual UNION ALL
    select 124 ms_id FROM dual UNION ALL
    select 122 ms_id FROM dual UNION ALL
    select 106 ms_id FROM dual UNION ALL
    select 118 ms_id FROM dual UNION ALL
    select 111 ms_id FROM dual UNION ALL
    select 103 ms_id FROM dual UNION ALL
    select 127 ms_id FROM dual UNION ALL
    select 126 ms_id FROM dual
    ), tmp2 AS(
    select 121 sectors_main_id, 1 emp_id, 10000 base_salary from dual union all
    select 121 sectors_main_id, 2 emp_id, 10000 base_salary from dual union all
    select 121 sectors_main_id, 3 emp_id, 10000 base_salary from dual union all
    select 121 sectors_main_id, 4 emp_id, 10000 base_salary from dual union all
    select 121 sectors_main_id, 5 emp_id, 10000 base_salary from dual union all
    select 121 sectors_main_id, 6 emp_id, 10000 base_salary from dual union all
    select 121 sectors_main_id, 7 emp_id, 10000 base_salary from dual union all
    select 121 sectors_main_id, 8 emp_id, 10000 base_salary from dual union all
    select 121 sectors_main_id, 9 emp_id, 10000 base_salary from dual union all
    select 121 sectors_main_id, 10 emp_id, 10000 base_salary from dual union all
    select 121 sectors_main_id, 11 emp_id, 10000 base_salary from dual
    SELECT
    ms_id, COUNT(*) cnt
    ,NVL(ROUND(percentile_cont(0.25) within group (order by base_salary),0),0) bs_q1
    ,NVL(ROUND(percentile_cont(0.5) within group (order by base_salary),0),0) bs_median
    ,NVL(ROUND(percentile_cont(0.5) within group (order by base_salary),0),0) bs_median
    FROM tmp2 e,
    tmp s
    where s.ms_id = e.SECTORS_MAIN_ID (+)
    GROUP BY ms_id

  • Ora - 1555 error with one query

    Hi
    We are getting ora-1555 error for particularly one query.I am providing the details
    1.Database version : 9.2.0.8
    2.Database size : 1354 gb
    3.Undo tablespace size : 118 GB
    4.Undo retention is 18000 secs
    SELECT
    distinct poi.company_code po_comp_code, poi.customer_number po_customer_number, poi.purchase_order_number, poi.purchase_order_line_item, poi.purchase_order_sub_item_1, poi.purchase_order_sub_item_2, poi.material_status, dt.company_code del_company_code, dt.site_code del_site_code, dt.delivery_number FROM PURGEWORKPO pw JOIN PurchaseOrderItem poi ON (poi.company_code = pw.purchase_order_company_code AND poi.customer_number = pw.purchase_order_customer_number AND poi.purchase_order_number = pw.purchase_order_number ) JOIN MaterialReceipt mr ON (mr.purchase_order_company_code = pw.purchase_order_company_code AND mr.purchase_order_customer_no = pw.purchase_order_customer_number AND mr.purchase_order_number = pw.purchase_order_number) JOIN ReceivingItem ri ON (ri.company_code = mr.company_code AND ri.site_code = mr.site_code AND ri.receiving_number = mr.receiving_number AND ri.package_number = mr.package_number) JOIN DeliveryTicket dt ON (dt.company_code = ri.del_company_code AND dt.site_code = ri.del_site_code AND dt.delivery_number = ri.delivery_number) WHERE pw.purge_session_id = ? AND (( poi.material_status <> 7) OR (DT.CONFIRMED_DATE NOT between ? AND
    ?)) I am providing some part of the query which is used for purging the data.This query is failing with ora -1555 after Please let us know what action need to be taken.since undo tablespace size and retention time has enough values
    Thanks
    PV

    user10719327 wrote:
    Hi
    We are getting ora-1555 error for particularly one query.I am providing the details
    1.Database version : 9.2.0.8
    2.Database size : 1354 gb
    3.Undo tablespace size : 118 GB
    4.Undo retention is 18000 secs
    SELECT
    distinct poi.company_code po_comp_code, poi.customer_number po_customer_number, poi.purchase_order_number, poi.purchase_order_line_item, poi.purchase_order_sub_item_1, poi.purchase_order_sub_item_2, poi.material_status, dt.company_code del_company_code, dt.site_code del_site_code, dt.delivery_number FROM PURGEWORKPO pw JOIN PurchaseOrderItem poi ON (poi.company_code = pw.purchase_order_company_code AND poi.customer_number = pw.purchase_order_customer_number AND poi.purchase_order_number = pw.purchase_order_number ) JOIN MaterialReceipt mr ON (mr.purchase_order_company_code = pw.purchase_order_company_code AND mr.purchase_order_customer_no = pw.purchase_order_customer_number AND mr.purchase_order_number = pw.purchase_order_number) JOIN ReceivingItem ri ON (ri.company_code = mr.company_code AND ri.site_code = mr.site_code AND ri.receiving_number = mr.receiving_number AND ri.package_number = mr.package_number) JOIN DeliveryTicket dt ON (dt.company_code = ri.del_company_code AND dt.site_code = ri.del_site_code AND dt.delivery_number = ri.delivery_number) WHERE pw.purge_session_id = ? AND (( poi.material_status <> 7) OR (DT.CONFIRMED_DATE NOT between ? AND
    ?)) I am providing some part of the query which is used for purging the data.This query is failing with ora -1555 after Please let us know what action need to be taken.since undo tablespace size and retention time has enough values
    do NOT have COMMIT inside LOOP!
    only have single COMMIT after all rows have been DELETED

  • ORA-01722: Error while executing query in Query Designer

    Hi All;
    I am getting the below error while executing a query
    ORA-01722: invalid number
    Error reading the data of InfoProvider
    Error while reading data; navigation is possible
    Have anyone encountered this before? How do i resolve this?
    Thanks!
    ~ Arun KK

    Hi,
    Did you checked all the setting required to run this query are present in the Qualtiy system??
    Which means all the characteristics,key figures are in active state.
    Also all the cubes are in active state with no issues with the involved in the dimensions used for the query.
    Also do a check in the query and if you have authorization try to save the same query and execute the saved one again in quality and see if the same error happens again.
    Thanks
    Ajeet

  • ORA-01427 error in the query

    Hi all,
    I am using a query that has about 12 select clauses in the main Select clause and also other independent columns. I am also using order by for one of the independent column. i am getting an error ORA-01427 - Single subquery returns more than one row.How to resolve this issue. If order by is removed it works. But order by is mandatory here.
    Thanks

    Hi!
    Please post your query. Without your query I couldn't give you a precise answner. But I guess that your problem is that you've used a single row operator like = in a WHERE-Clause where you get more then one row. Try using somithing like IN, SOME, ANY ...
    Hope this helps!
    regards

  • Java.sql.SQLException: ORA-00933: error when  executing query

    Hello,
    I am trying to execute the following query from a jsp page.
    String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";
    stmt.executeQuery(sqlUpdate);
    I get the follwoing error java.sql.SQLException: ORA-00933: SQL command not properly ended
    When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.
    Thanks,
    Nikky128

    Nikky128 wrote:
    Hello,
    I am trying to execute the following query from a jsp page.There's a big part of your problem. You shouldn't be doing database stuff in JSPs. If you must, you should be using JSTL and its <sql> tags.
    String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";Not using PreparedStatement here is just a silly noob error.
    When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.Probably a single or double quote that you can't see. PreparedStatement will eliminate that problem.
    %

  • ORA-00600 error in Oracle 10.1.0.5 database

    Hi All,
    Please help me to get rid of the below mentioned issue.
    I am supporting a Oracle 10.1.0.5 prod database. we are getting a below ora-600 error message
    ORA-00600: internal error code, arguments: [qerpxSlaveFetch1], [0], [], [], [], [], [], []
    I have searched in metalink and there it is stated as bug with the product.
    They adviced us to apply the Patch 3897688 or disable parallelism or Upgrade to the fixed release, 10gR2.
    The patch 3897688 is not for window platform. Upgrade to 10gR2 is not possible in near future.
    So please help me how to disable parallelism in 10g database.

    ok fine satish will ask our development team to try your suggestion.
    Can you please tell me whether the following init parameters we can use to disable parallelism?
    PARALLEL_AUTOMATIC_TUNING = FALSE
    PARALLEL_SERVER=FALSE (this alone will disable Parallel Execution)
    PARALLEL_MIN_SERVERS=0 (this is additional restriction)
    PARALLEL_MAX_SERVERS=0 (this is additional restriction)
    Regards,
    Aruna

  • ORA-00001 error

    Hi all,
        After we restarted portal,we cannot start jcontrol,and we get a strange ORA-00001 error,when we check the log:
    Here is the log defaulttrace:
    Date : 12/10/2007
    Time : 15:13:26:500
    Message : ORA-00001: unique constraint (SAPSR3DB.SYS_C005260) violated
    com.sap.caf.eu.gp.base.exception.EngineException: ORA-00001: unique constraint (SAPSR3DB.SYS_C005260) violated
         at com.sap.caf.eu.gp.model.pfw.wfc.local.db.impl.AbstractLocalProcessPersistence.createBlockInputLocal(AbstractLocalProcessPersistence.java:904)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.db.impl.LocalProcessPersistence.createBlock(LocalProcessPersistence.java:250)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.startBlock(StatusWriter.java:984)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.startActivity(StatusWriter.java:927)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.changeParentBlockStatus(StatusWriter.java:2710)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.changeParentBlockStatus(StatusWriter.java:2728)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.updateProcessStatusUserDecisionBlock(StatusWriter.java:2574)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.updateProcessStatus(StatusWriter.java:2235)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.status.StatusWriter.completeAction(StatusWriter.java:223)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.impl.LocalWorkflowConnector.completeAction(LocalWorkflowConnector.java:247)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.impl.BackGroundActionProcessorHelper.processAction(BackGroundActionProcessorHelper.java:223)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.impl.queue.BackgroundCOQueueProcessor.run(BackgroundCOQueueProcessor.java:269)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.sql.DuplicateKeyException: ORA-00001: unique constraint (SAPSR3DB.SYS_C005260) violated
         at com.sap.sql.jdbc.common.CommonPreparedStatement.executeUpdate(CommonPreparedStatement.java:259)
         at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:240)
         at com.sap.caf.eu.gp.model.pfw.wfc.local.db.impl.AbstractLocalProcessPersistence.createBlockInputLocal(AbstractLocalProcessPersistence.java:901)
         ... 15 more
    And i also check the startlog.It seems ok.
    Someone knows what's happening and how to solve this?
    Best regards
    delma

    Hi,Shikhil
    Thank you for your reply.
    But actually,we just install a WEB AS FOR JAVA on the portal server,no ABAP at all.
    I think it may be the database problem.
    Thank you.
    Best regards
    delma

  • ORA-12154 Error After Install of Enterprise Manager

    I have a new new laptop with minimal software installed. Everything was fine and I was able to connect to 4 different Oracle 9i databases.
    This morning I installed Oracle Enterprise Manager (10g) and now I get the dreaded ORA-12154 error.
    I now find a copy of TNSNAMES.ORA in three places. I have copied the correct version to the two new 10G locations and I have verified that all three copies of TNSNAMES.ORA and SQLNET.ORA are correct and identical.
    Do anybody have any idea what else could be wrong?

    I am certain the TNSNAMES.ORA file is fine as it is "pushed" from a central IT department. I have compared it to the one on a second computer (which has only 9i installed) in my office and they are identical.
    I examined the Oracle 9i directories and there was no LISTENER.ORA anywhere. On the 9i only computer the command - C:\>dir listener.ora /s /p executed in a DOS window returned no files.
    Everything was working fine until I installed Enterprise Manager 10g (10.2.0.2.1).
    I have TOAD installed and it connects to both of the 9i development and production databases, so I know the TNSNAMES.ORA is okay.
    It woudl seem that there is a conflict between 10g and 9i Developer/2000.

  • Dblink yields ora-00904 error

    I have a stored procedure that executes a query through a dblink to another database. The remote database is Oracle 8.1.7, the local database is Oracle 10.2.0. After making a minor change to the stored procedure, the procedure will not compile, issuing an ORA-00904 error for columns on the remote table being queried. Running the query outside the stored procedure works just fine. Compiling the procedure from our test server (also running Oracle 10.2.0) works fine. Attempts to return to previous code (without the minor change) also gets the same ORA-00904 error.
    Anyone have any ideas regarding the cause of this error?

    I'm going to answer my own question:
    Apparently, links to databases older than 9i can sometimes (perhaps at random) have the local cache in the shared pool get corrupted. The Oracle notes I saw do not describe exactly how the cache gets corrupted. This appears to be a longstanding bug without a solution - only a work around.
    The work around is to flush the cache:
    alter system flush shared pool;
    The most relevant Metalink document I found was
    Note:397658.1
    https://metalink.oracle.com/metalink/plsql/f?p=130:14:1002445788225491569::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,397658.1,1,1,1,helvetica

  • Join the same view using 2 different conditions, getting error ORA-00918

    Hi, I am trying to do a full outer join using the same view with different where conditions. Sample code below. I am getting the error "ORA-00918: column ambiguously defined". I have used as much alias as I can on the select statements but it gives me the same error.
    The weird thing is, RIGHT OUTER JOIN and LEFT OUTER JOIN will work fine. Only FULL OUTER gives the error above.
    Thanks in advance for your help.
    SELECT firsttable.<column_name>, secondtable.<columnname>
    FROM
    SELECT ...
    FROM V_MYVIEW
    WHERE <column_name> IN (1,2)
    ) firsttable
    FULL OUTER JOIN
    SELECT ...
    FROM V_MYVIEW
    WHERE <column_name> IN (3,4)
    ) secondtable
    ON firsttable.<column_name> and secondtable.<column_name>

    ON firsttable.<column_name> and secondtable.<column_name> ON firsttable.<column_name> = secondtable.<column_name>

  • Getting error-ORA-24381: error(s) in array DML

    Hi i have written the following code to bulk insert into a database table.
    I am getting an error while returning the result of the bulk insert query into the collection
    I have tried to track it by using sql%bulk_exceptions.error_code.
    But the error code that it is showing is just 1.
    I trapped it using sqlerrm.
    and that is showing-error(s) in array DML
    What do i do?
    DECLARE
       CURSOR temp_rec_tap_cur
       IS
          SELECT *
            FROM temp_records_tap;
       TYPE temp_rec_tab IS TABLE OF temp_rec_tap_cur%ROWTYPE;
       v_test_tab   temp_rec_tab;
       v_rec_num    num_tab;
       v_filename   temp_records_tap.file_name%TYPE;
       v_error_code tap_reject.error_code%type;
       v_rej_value  tap_reject.field_rej%type;                      
       v_errors number;   
    BEGIN
       SELECT file_name
         INTO v_filename
         FROM table1
         WHERE ROWNUM<2;
       OPEN temp_rec_tap_cur;
       LOOP
          BEGIN
             FETCH temp_rec_tap_cur
             BULK COLLECT INTO v_test_tab LIMIT 1000;
             FORALL i IN v_test_tab.FIRST .. v_test_tab.LAST SAVE EXCEPTIONS
                INSERT INTO tapdetail_tapin
                     VALUES v_test_tab (i)
                  RETURNING record_num
                    BULK COLLECT INTO v_rec_num;
          EXCEPTION
             WHEN DUP_VAL_ON_INDEX
             THEN
                NULL;
             WHEN OTHERS
             THEN
             v_errors:=sql%bulk_exceptions.count;
             for i in 1..v_errors
             loop
             dbms_output.put_line(sql%bulk_exceptions(i).error_code);
             p3_errorlog ('TAPINDETAWARE', SQLERRM, v_filename);     
             end loop;
             END;
                --RAISE;
          EXIT WHEN temp_rec_tap_cur%NOTFOUND;
       END LOOP;
    INSERT INTO table2
    SELECT file_id, file_name, sender_pmn, recipient_pmn, call_date,
                 call_date_only, call_type, call_number, FIRST_RECORD,
                 service_type, service_code, home_bid, serve_bid,
                 chargeable_subs_type, imsi_min, msisdn_mdn, air_charges,
                 air_charges_sdr, air_time, national_call_charges,
                 national_call_charges_sdr, national_call_time,
                 international_call_charges, international_call_charges_sdr,
                 international_call_time, dir_assist_charges,
                 dir_assist_charges_sdr, dir_assist_time, other_charges,
                 other_charges_sdr, other_time, volume_charges,
                 volume_charges_sdr, volume_units, tot_charges, tot_charges_sdr,
                 tot_duration, state_tax, state_tax_sdr, local_tax,
                 local_tax_sdr, state_and_use_tax, state_and_use_tax_sdr, va_tax,
                 va_tax_sdr, other_tax, other_tax_sdr, charge_refund_indicator,
                 advised_charge_currency, advised_charge, advised_charge_sdr,
                 advised_charge_commission, advised_charge_commission_sdr,
                 exchange_rate, mcc, mnc, process_date, chargeable_units,
                 record_num, mscid,null,null,decode(call_type,0,'250',1,'251',5,'255'),null,'Duplicate Call'
                 from temp_records_tap
                 where record_num not in (select column_value from table(v_rec_num)) ;
    EXCEPTION
    WHEN OTHERS THEN
    p3_errorlog ('TAP', SQLERRM, v_filename);  
    END;Edited by: user8731258 on Sep 14, 2010 2:58 AM
    Edited by: user8731258 on Sep 14, 2010 3:01 AM

    What is the type declaration of num_tab and how is record_num defined?
    ORA-24381: error(s) in array DML
    Cause: One or more rows failed in the DML.indicates that you fail on the insert itself. Are the table definitions the same? Same primary/unique keys?
    Edited by: MBr on 14-Sep-2010 03:16

  • Getting ORA-01429 error while changing character set

    When I am changing character set from WE8DEC to AL32UTF8, I am getting ORA-01429 error
    SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8 ;
    ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01429: Index-Organized Table: no data segment to store overflow row-pieces

    Chockalingam wrote:
    I am using above steps as per oracle doc only.
    http://docs.oracle.com/cd/B10500_01/server.920/a96529/ch10.htm
    No, you are not.
    - You are not using the correct version doc vs. Oracle server version. Try to find the same suggestion in the relevant doc.
    - The doc you reference specifically says "... it can be used only under special circumstances. The ALTER DATABASE CHARACTER SET statement does not perform any data conversion, so it can be used +if and only if the new character set is a strict superset of the current character set+." (emphasis is mine)
    You do not have a strict superset.
    - Also the special clauses you have used are not documented - for a reason.
    Please edit your posts above to remove the ill-advice (steps with internal use only clauses) that does not belong on a forum.
    Edited by: orafad on Mar 16, 2012 9:47 PM

  • I am getting ORA-01007 error at runtime in forms

    Hello All,
    Good Mornig!
    I am new to this group.
    I have some problems with oracle forms 9i. I am not able to findout the correct reason
    for the below problem.
    Please read information given below and give me the exact reason what has happend,
    1) We have 2 different schemas,one user_samp1 and other user_real .
    When we compile the forms against user_samp1 schema and deploy in
    production(user_real), we are getting runtime error ie ORA-01007.
    When we debug the problem ,we found that the error was with a cursor which
    was taking the data using * . ie 'cursor a is select * from table1'. When the cursor is
    opened, we were getting this error.
    But when we replace * with columns ( ie 'cursor a is select col1,col2 from table1' )
    Or the form is compiled against production schema, this error is not coming.
    The structure in the two schemas is as below....
    user_samp1 ::
    table1 ::
    col1 number
    col2 number
    col3 char
    production
    table1 ::
    col1 number
    col3 char
    col2 number
    I am giving the structure because the order of columns is different, when you describe
    in those two different schemas.
    We are using forms 9i (and oracle 9i) and these forms are migrated from forms 6i.
    ( Same problem with 10g forms )
    2) The below statement works even the col2 column is not present in table2 ,
    Select col1 from table1 where col2 in (select col2 from table2);
    But when you use alias then the above query gives error.
    ( This query might be taking col2 in table1 as value for the col2 present in
    subquery for table2. But is this not confusing)
    3)Is there anyway to findout all the objects(Oracle Objects Used in forms) present in a form. (eg For doing impact)
    Thanks in Advance.
    With Regards,
    Sreekanth Babu

    Cause: A reference was made to a variable not listed in the SELECT clause. In
    OCI, this can occur if the number passed for the position parameter is less than
    one or greater than the number of variables in the SELECT clause in any of the
    following calls: DESCRIBE, NAME, or DEFINE. In SQL*Forms or SQL*Report,
    specifying more variables in an INTO clause than in the SELECT clause also
    causes this error.
    Action: Determine which of the problems listed caused the problem and take
    appropriate action.

  • Oracle 8i, Getting ORA-1501 error while creating new DB

    Hi folks,
    I am trying create a new database on an HP Machine (Details given below) but getting following error.
    ORA-1501 - signalled during Create Database
    LOGFILE 'G:\logfiles\logaf1.ora'
    We actually have a custom application setup.exe to create new database.
    Same setup when installed on a different low end machine works fine.
    Before begining the setup in summary page it shows following information.
    Block buffer count = -3 Bytes
    Shared Pool Size = -41425 KBytes
    Yes the values displayed are in negative.
    Don't know if this is the reason for the ORA-1501 error.
    Can anyone please suggest how to resolve this issue.
    Machine configuration is as follows:
    H/W details:
    HP Server with RAID configuration
    4, PIII CPU's
    RAM: "4 GB"
    S/W details
    O.S:Windows 2000 Server with Service Pack-2
    Oracle Version: 8i
    Patch applied: Oracle8i Patch Set Version 8.1.7.3.0

    Try look to alert<SID>.log file for full error report (you could paste it here).
    Also from alert log you could get real values for db_block_buffers and shared_pool_size parameters that used during instance startup.

Maybe you are looking for