Ora-01427 error

Hi ,
i am getting Ora-01427 error when i ran below script . my sub query returns more
than 1 row . please help me in fixing this .
update registrant_address a set a.text_res_address_nbr =
(select c.street_number from registrant_address e , registrant b , z_polk_conv08172005 c
where e.key_registrant = b.key_registrant and b.key_registrant_old = c.registrant_id)
thanks,
Kar

Hi ,
i am getting Ora-01427 error when i ran below script
. my sub query returns more
than 1 row . please help me in fixing this .
update registrant_address a set
a.text_res_address_nbr =
(select c.street_number from registrant_address e ,
registrant b , z_polk_conv08172005 c
where e.key_registrant = b.key_registrant and
b.key_registrant_old = c.registrant_id)
thanks,
Kar
i am getting Ora-01427 error when i ran below script
. my sub query returns more
than 1 row . please help me in fixing this .are you sure that you are getting ORA-01427, because ORA-01422 gives you the message 'Exact fetch returns more than one row' !!
There are different ways to cope up with this issue,
1. If you really don't care about a particular street_number, then go for rownum =1 in the where condition if the select statement.
2. If you care about returning the right value, then probably you need to find out an attribute or a combination of attributes in these three tables used in your select statement that gives you distinct identification for each row.
Hope this helps
Thanks

Similar Messages

  • 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

  • ORA-01427 error configuring ORDS 3.0.0.65.09.31

    I got the error below when trying to configure ORDS 3.0.0.65.09.31 using the parameter file method.  I left all the defaults in exept for ords_params.properties, setting just db.hostname, db.port and db.servicename.
    Any ideas?
    Thanks,
    John
    C:\oracle\Oracle_REST_Data_Services\ords.3.0.0.65.09.31>java -jar ords.war install simple
    Enter the database password for ORDS_PUBLIC_USER:
    Confirm password:
    Please login with SYSDBA privileges to verify Oracle REST Data Services schema. Installation may be required.
    Enter the username with SYSDBA privileges to verify the installation [SYS]:
    Enter the database password for SYS:
    Confirm password:
    null
    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at oracle.dbtools.jarcl.Entrypoint.main(Entrypoint.java:58)
    Caused by: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
    ORA-01427: single-row subquery returns more than one row
    ORA-06512: at line 5
            at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
            at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:392)
            at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:385)
            at oracle.jdbc.driver.T4C7Ocommoncall.processError(T4C7Ocommoncall.java:91)
            at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
            at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
            at oracle.jdbc.driver.T4C7Ocommoncall.doOLOGOFF(T4C7Ocommoncall.java:59)
            at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:844)
            at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:2498)
            at oracle.dbtools.rt.config.setup.SchemaSetup.getSchemaVersion(SchemaSetup.java:223)
            at oracle.dbtools.rt.config.setup.SchemaSetup.addSchemaParams(SchemaSetup.java:85)
            at oracle.dbtools.rt.config.setup.SchemaSetup.schemaParams(SchemaSetup.java:42)
            at oracle.dbtools.rt.config.setup.Setup.execute(Setup.java:180)
            at oracle.dbtools.cmdline.DefaultCommand.execute(DefaultCommand.java:104)
            at oracle.dbtools.cmdline.Commands.execute(Commands.java:172)
            at oracle.dbtools.cmdline.Commands.main(Commands.java:135)
            at oracle.dbtools.cmdline.Commands.main(Commands.java:299)
            ... 5 more

    --context-path does not specify the location of the configuration folder, it specifies the path at which ORDS is deployed, in your case you have specified that ORDS should be available at:
    http://server:port/u01/ords.3.0.0.65.09.31_comndev_8088/configs/

  • OIM ORA-01427 error

    Gurus,
    Today, I got this error in my UAT server OIM 9.1.0.2. Anyone can help me on this, please?
    ERROR,25 Jun 2011 07:25:40,[XELLERATE.SERVER],Class/Method: tcObjectItemInfo/checkPasswordPolicy encounter some problems: {1}
    com.thortech.xl.orb.dataaccess.tcDataAccessException
    at com.thortech.xl.dataaccess.tcDataAccessExceptionUtil.createException(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.createException(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.readPartialPreparedStatement(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.readPreparedStatement(Unknown Source)
    at com.thortech.xl.dataobj.PreparedStatementUtil.execute(Unknown Source)
    at com.thortech.xl.dataobj.tcObjectItemInfo.checkPasswordPolicy(Unknown Source)
    at com.thortech.xl.dataobj.tcObjectItemInfo.eventPreInsert(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.addObjectFormChildData(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.addObjectFormChildData(Unknown Source)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperationsSession.addObjectFormChildData(Unknown Source)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperations_2j82mm_EOImpl.addObjectFormChildData(tcFormInstanceOperations_2j82mm_EOImpl.java:1728)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperations_2j82mm_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperations_2j82mm_EOImpl_1030_WLStub.addObjectFormChildData(Unknown Source)
    at Thor.API.Operations.tcFormInstanceOperationsClient.addObjectFormChildData(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor997.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy65.addObjectFormChildData(Unknown Source)
    at com.bitur.service.RequestDataService.processObjectForms(RequestDataService.java:3082)
    at com.bitur.service.RequestDataService.genReqKeySumitNow(RequestDataService.java:2909)
    at com.bitur.struts2.requestVerification.RequestVerificationAction.submitNow(RequestVerificationAction.java:1232)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
    at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
    at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
    at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.bitur.struts2.security.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:171)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
    at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by [Nested Exception]:
    java.sql.SQLException: ORA-01427: single-row subquery returns more than one row
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:947)
    at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:891)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3425)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1490)
    at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:128)
    at com.thortech.xl.dataaccess.tcDataBase.readPartialPreparedStatement(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataBase.readPreparedStatement(Unknown Source)
    at com.thortech.xl.dataobj.PreparedStatementUtil.execute(Unknown Source)
    at com.thortech.xl.dataobj.tcObjectItemInfo.checkPasswordPolicy(Unknown Source)
    at com.thortech.xl.dataobj.tcObjectItemInfo.eventPreInsert(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
    at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
    at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.addObjectFormChildData(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcFormInstanceOperationsBean.addObjectFormChildData(Unknown Source)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperationsSession.addObjectFormChildData(Unknown Source)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperations_2j82mm_EOImpl.addObjectFormChildData(tcFormInstanceOperations_2j82mm_EOImpl.java:1728)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperations_2j82mm_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at com.thortech.xl.ejb.beans.tcFormInstanceOperations_2j82mm_EOImpl_1030_WLStub.addObjectFormChildData(Unknown Source)
    at Thor.API.Operations.tcFormInstanceOperationsClient.addObjectFormChildData(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor997.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy65.addObjectFormChildData(Unknown Source)
    at com.bitur.service.RequestDataService.processObjectForms(RequestDataService.java:3082)
    at com.bitur.service.RequestDataService.genReqKeySumitNow(RequestDataService.java:2909)
    at com.bitur.struts2.requestVerification.RequestVerificationAction.submitNow(RequestVerificationAction.java:1232)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
    at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
    at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
    at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at com.bitur.struts2.security.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:171)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
    at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    ERROR,25 Jun 2011 07:25:40,[XELLERATE.SERVER],Class/Method: tcTableDataObj/getString encounter some problems: Column 'UD_DELOY_OC_PASSWORD' not found
    com.thortech.xl.dataaccess.tcDataSetException: Column 'UD_DELOY_OC_PASSWORD' not found
    at com.thortech.xl.dataaccess.tcDataSet.getColumnIndex(Unknown Source)
    at com.thortech.xl.dataaccess.tcDataSet.getString(Unknown Source)
    thanks,

    On your form, do you have the field listed in the error? If this is a bug, i can only assume that the password policy during provisioning is looking for the field with the format supplied in the error for UD_FORMNAME_PASSWORD and it can't find the field. I would suggest creating this field for your password.
    -Kevin

  • ORA-01427 error occurs

    Hi please someone help me..
    TRUNCATE TABLE dmfg.STXN_INVOICE_T ;
    COMMIT;
    DROP TABLE dmfg.STXN_INVOICE_T ;
    CREATE  TABLE
    dmfg.STXN_INVOICE_T
    storage (initial 1024k next 1024k)
    nologging
    AS SELECT * FROM dmfg.STXN_Invoice_V;
    COMMIT;dmfg.STXN_INVOICE_T ---> Table
    dmfg.STXN_INVOICE_V -- > View
    My point is the underlying base table of view is dropped and base table got recreated from its view..does this work??

    Didn't feel like doing a quick test?
    SQL> create table STXN_INVOICE_T (n number);
    Table created.
    SQL> create view STXN_Invoice_V as select * from STXN_INVOICE_T;
    View created.
    SQL> TRUNCATE TABLE STXN_INVOICE_T ;
    Table truncated.
    SQL> COMMIT;
    Commit complete.
    SQL> DROP TABLE STXN_INVOICE_T ;
    Table dropped.
    SQL> CREATE  TABLE
      2   STXN_INVOICE_T
      3   storage (initial 1024k next 1024k)
      4   nologging
      5   AS SELECT * FROM STXN_Invoice_V;
    AS SELECT * FROM STXN_Invoice_V
    ERROR at line 5:
    ORA-04063: view "SCOTT.STXN_INVOICE_V" has errors
    SQL> COMMIT;
    Commit complete.By the way, you don't need to commit after truncate or any ddl.

  • SRKIM: 11.5.10: AP: RECEIPT MATCH 된 INVOICE 조회 시  ORA-01427 가 발생할때

    PROBLEM
    ======
    Release 11.5.10:
    AP INVOICE 화면에서 RECEIPT MATCH 된 INVOICE 조회 시 아래와 같은 ERROR 가 발생한다.
    ORA-01427: single-row subquery returns more than one row
    SOLUTION
    ======
    해당 ISSUE 는 Bug 4270082: Querying Receipt Matched Invoice In Invoice Workbench Returns Ora-01427 에 의한 것으로 financials Family Pack H (AP.O) and higher 에서 해결이 되나 그 이전 VERSION 에서는 아래와 같이 CODEFIX 로 해결 해야 한다.
    AP_HOLDS_V view source 에서 QUERY 부분을 아래와 같이 수정 한다.
    수정 전:
    SELECT DECODE(PLT.MATCHING_BASIS, 'QUANTITY',RTXN1.QUANTITY,
    'AMOUNT', NULL) FROM RCV_TRANSACTIONS RTXN1 WHERE
    RTXN1.PO_LINE_LOCATION_ID = PLL.LINE_LOCATION_ID AND
    RTXN1.PARENT_TRANSACTION_ID = RTXN.TRANSACTION_ID AND
    RTXN1.TRANSACTION_TYPE = 'ACCEPT'
    수정 후:
    SELECT DECODE(PLT.MATCHING_BASIS, 'QUANTITY',SUM(RTXN1.QUANTITY),
    'AMOUNT', NULL) FROM RCV_TRANSACTIONS RTXN1 WHERE
    RTXN1.PO_LINE_LOCATION_ID = PLL.LINE_LOCATION_ID AND
    RTXN1.PARENT_TRANSACTION_ID = RTXN.TRANSACTION_ID AND
    RTXN1.TRANSACTION_TYPE = 'ACCEPT'
    REFERENCE
    =======
    Note. 306702.1 - APXINWKB Querying A Receipt Matched Invoice Results In ORA-01427 Error

  • EA2: ORA-01427 clicking on a view in the navigator

    SQLDev: 1.5.0.52.03
    Java: 1.6.0_04
    Oracle: 9.2.0.7.0
    I'm getting the following error when I click on a view in the navigator pane:
    An error was encountered performing the requested operation:
    ORA-01427: single-row subquery returns more than one row 01427. 00000 - "single-row subquery returns more than one row"I'm not seeing any errors in the shell window.
    After clicking on <OK> in the error dialog, the normal tabs (Columns, Data, Grants, Dependencies, Details, SQL) are displayed, but there is no content in the Columns tab.
    All the other tabs seem to function normally.
    Here is the DDL from the SQL tab
    CREATE OR REPLACE VIEW "SUBSCRIPTIONS"
        "ORDER_ID", "SUNBURST_ORDER_ID", "SIEBEL_ORDER_ID", "ACCOUNT_ID",
        "COMP_ID", "SUBACCOUNT_ID", "START_DATE", "END_DATE", "PULL_DATE",
        "SUBSCRIPTION_TYPE", "PRICE_CLASS", "DESCRIPTION", "SEAT_COUNT",
        "ORDER_DURATION", "CALLBACK_INTERVAL", "UPDATE_DATE", "UPDATE_USERNAME",
        "AFFILIATE"
    AS
        SELECT order_id,
            sunburst_order_id,
            siebel_order_id,
            account_id,
            comp_id,
            subaccount_id,
            start_date,
            end_date,
            pull_date,
            product_id,
            price_class,
            product_name,
            add_users,
            order_duration,
            callback_interval,
            last_mdfy_date,
            last_mdfy_emp,
            affiliate
        FROM csbcrossworlds.subscriptions;We have 15 views in this schema, 3 of them fail this way but the other 12 display the columns just fine. So far I am unable to detect any commonality.
    Any ideas?

    Ok, I think I found the problem. The view in question (SUBSCRIPTIONS) is owned by 'PHILC' and it references a table named 'SUBSCRIPTIONS' owned by 'CSBCROSSWORLDS'. There are two other development schemas that also own tables named 'SUBSCRIPTIONS'.
    I believe the 'Columns' tab is executing the query below. The subquery in this SQL tries to identify the primary key columns for the 'SUBSCRIPTIONS' view in my schema (PHILC):
    SELECT
        c.column_name,
        DECODE(
            data_type,
                'CHAR',      data_type||'('||c.data_length||')',
                'VARCHAR',   data_type||'('||c.data_length||')',
                'VARCHAR2',  data_type||'('||c.data_length||')',
                'NCHAR'   ,  data_type||'('||c.data_length||')',
                'NUMBER'  ,  DECODE(c.data_precision,null,'NUMBER', data_type||'('||c.data_precision||','||c.data_SCALE||')'),
                'NVARCHAR',  data_type||'('||c.data_length||')',
                'NVARCHAR2', data_type||'('||c.data_length||')',
                data_type) data_type,
        DECODE(nullable, 'Y', 'Yes', 'No') nullable,
        c.DATA_DEFAULT,
        column_id,
        com.comments,
        (SELECT 1 FROM all_constraints, all_cons_columns
          WHERE all_constraints.constraint_type = 'P' AND
                all_constraints.constraint_name = all_cons_columns.constraint_name AND
                all_constraints.owner = all_cons_columns.owner AND
                all_cons_columns.table_name = c.table_name AND
                c.column_name = all_cons_columns.column_name) Primary_Key,
        c_update.insertable,
        c_update.updatable,
        c_update.deletable
    FROM
        sys.all_tab_Columns c, sys.all_col_comments com, sys.user_updatable_columns c_update
    WHERE
        c.owner = :OBJECT_OWNER AND
        c.table_name = :OBJECT_NAME AND
        c.table_name = com.table_name AND
        c.owner = com.owner AND
        c.column_name = com.column_name AND
        c_update.column_name = com.column_name AND
        c_update.table_name = com.table_name
    ;Extracting the subquery into this:
    SELECT
        all_constraints.owner,
        all_constraints.table_name,
        all_constraints.constraint_name
    FROM all_constraints, all_cons_columns
    WHERE
        all_constraints.constraint_type = 'P' AND
        all_constraints.constraint_name = all_cons_columns.constraint_name AND
        all_constraints.owner = all_cons_columns.owner and
        all_cons_columns.table_name = 'SUBSCRIPTIONS' and
        'ORDER_ID' = all_cons_columns.column_name;I got this output:
       owner          table_name      constraint_name
    CUTOVER          SUBSCRIPTIONS    SUBSCRIPTIONS_PK
    CROSSWORLDS      SUBSCRIPTIONS    SUBSCRIPTIONS_PK
    CSBCROSSWORLDS   SUBSCRIPTIONS    SUBSCRIPTIONS_PKLooking at the DDL for the view, the row we really want is for owner 'CSBCROSSWORLDS'. Unfortunately, that means having to somehow parse the SQL text to extract the owner name...
    Phil

  • TWO ERRO ORA-01427: single-row subquery returns more than one row

    Hi,
    I have a procedure which contains a cursor. If i run the select statement in the cursor separetly, it returns only value and works fine. But the same select statement in the cursor of a procedure throws me the error as below:
    TWO ERRO ORA-01427: single-row subquery returns more than one row
    Not sure what going on...any help appreciated.
    Below is the select statement:
    SELECT DISTINCT PSE.PARENT_POSITION_ID,
    (SELECT DISTINCT PPD1.SEGMENT2
    FROM PER_POSITION_DEFINITIONS PPD1,
    HR_ALL_POSITIONS_F HAPF2,
    PER_POS_STRUCTURE_ELEMENTS PSE2
    WHERE TRUNC(SYSDATE) BETWEEN
    HAPF2.EFFECTIVE_START_DATE AND
    HAPF2.EFFECTIVE_END_DATE
    AND PPD1.POSITION_DEFINITION_ID =
    HAPF2.POSITION_DEFINITION_ID
    AND
    HAPF2.POSITION_ID = PSE2.PARENT_POSITION_ID
    AND PSE2.PARENT_POSITION_ID =
    PSE.PARENT_POSITION_ID
    AND ROWNUM = 1) SEGMENT2,
    (SELECT DISTINCT PAPF1.FIRST_NAME || ' ' ||
    PAPF1.LAST_NAME CHIEF_NAME
    FROM PER_ALL_PEOPLE_F PAPF1,
    PER_ALL_ASSIGNMENTS_F PAAF1
    WHERE TRUNC(SYSDATE) BETWEEN
    PAPF1.EFFECTIVE_START_DATE AND
    PAPF1.EFFECTIVE_END_DATE
    AND TRUNC(SYSDATE) BETWEEN
    PAAF1.EFFECTIVE_START_DATE AND
    PAAF1.EFFECTIVE_END_DATE
    AND PAAF1.POSITION_ID = PSE.PARENT_POSITION_ID
    AND PAPF1.PERSON_ID = PAAF1.PERSON_ID
    AND ROWNUM = 1) CHIEF_NAME
    FROM PER_POS_STRUCTURE_ELEMENTS PSE,
    HR_ALL_POSITIONS_F HAPF,
    PER_POSITION_DEFINITIONS PPD
    WHERE PSE.SUBORDINATE_POSITION_ID = 52744
    AND TRUNC(SYSDATE) BETWEEN HAPF.EFFECTIVE_START_DATE AND
    HAPF.EFFECTIVE_END_DATE
    AND HAPF.POSITION_ID = PSE.SUBORDINATE_POSITION_ID
    AND HAPF.POSITION_DEFINITION_ID = PPD.POSITION_DEFINITION_ID;
    Thanks
    PK
    Edited by: user539616 on Jun 30, 2009 6:30 PM

    Hi,
    The cursor has a different parameter? Maybe the query is not exactly the same. Could you check this?
    This is your query (formatted):
    SELECT DISTINCT PSE.PARENT_POSITION_ID,
                    (SELECT DISTINCT PPD1.SEGMENT2
                       FROM PER_POSITION_DEFINITIONS   PPD1,
                            HR_ALL_POSITIONS_F         HAPF2,
                            PER_POS_STRUCTURE_ELEMENTS PSE2
                      WHERE TRUNC(SYSDATE) BETWEEN HAPF2.EFFECTIVE_START_DATE AND
                            HAPF2.EFFECTIVE_END_DATE
                        AND PPD1.POSITION_DEFINITION_ID = HAPF2.POSITION_DEFINITION_ID
                        AND HAPF2.POSITION_ID = PSE2.PARENT_POSITION_ID
                        AND PSE2.PARENT_POSITION_ID = PSE.PARENT_POSITION_ID
                        AND ROWNUM = 1) SEGMENT2,
                    (SELECT DISTINCT PAPF1.FIRST_NAME || ' ' || PAPF1.LAST_NAME CHIEF_NAME
                       FROM PER_ALL_PEOPLE_F      PAPF1,
                            PER_ALL_ASSIGNMENTS_F PAAF1
                      WHERE TRUNC(SYSDATE) BETWEEN PAPF1.EFFECTIVE_START_DATE AND
                            PAPF1.EFFECTIVE_END_DATE
                        AND TRUNC(SYSDATE) BETWEEN PAAF1.EFFECTIVE_START_DATE AND
                            PAAF1.EFFECTIVE_END_DATE
                        AND PAAF1.POSITION_ID = PSE.PARENT_POSITION_ID
                        AND PAPF1.PERSON_ID = PAAF1.PERSON_ID
                        AND ROWNUM = 1) CHIEF_NAME
      FROM PER_POS_STRUCTURE_ELEMENTS PSE,
           HR_ALL_POSITIONS_F         HAPF,
           PER_POSITION_DEFINITIONS   PPD
    WHERE PSE.SUBORDINATE_POSITION_ID = 52744
       AND TRUNC(SYSDATE) BETWEEN HAPF.EFFECTIVE_START_DATE AND HAPF.EFFECTIVE_END_DATE
       AND HAPF.POSITION_ID = PSE.SUBORDINATE_POSITION_ID
       AND HAPF.POSITION_DEFINITION_ID = PPD.POSITION_DEFINITION_ID;Tips: To put formatted code you must use {noformat}{noformat} tags, start tag and end tag are the same,you don't need to put '/' in the close tag.
    Regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Impdp fails with ORA-01427 during full import of 10.2 db into 11.2

    Hello all,
    I'm running a full import from a dump file taken from our production db (10.2.0.4.0) on RHEL4 into a test db (11.2.0.3.0) on RHEL6.  I've done something very similar before with no errors but this time it returns the following in the output at the end of the partially successful import:
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS [TABLE_STATISTICS]
    ORA-06502: PL/SQL: numeric or value error
    LPX-00225: end-element tag "COL_STATS_ITEM" does not match start-element tag "HIVAL"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPW$WORKER", line 9001
    ----- PL/SQL Call Stack -----
      object      line  object
      handle    number  name
    0x1ea3a92c8     20462  package body SYS.KUPW$WORKER
    0x1ea3a92c8      9028  package body SYS.KUPW$WORKER
    0x1ea3a92c8     16665  package body SYS.KUPW$WORKER
    0x1ea3a92c8      3956  package body SYS.KUPW$WORKER
    0x1ea3a92c8      9725  package body SYS.KUPW$WORKER
    0x1ea3a92c8      1775  package body SYS.KUPW$WORKER
    0x1e9ec90f8         2  anonymous block
    ORA-39097: Data Pump job encountered unexpected error -1427
    ORA-39065: unexpected master process exception in DISPATCH
    ORA-01427: single-row subquery returns more than one row
    Job "SYSTEM"."SYS_IMPORT_FULL_02" stopped due to fatal error at 13:32:00
    The import is into a database that has had all the application users dropped (only Oracle-defined users still existing) but with table_exists_action set to skip (the default).  Several user objects from the source db are missing from the target.
    I've run this twice with the same results.  I can imagine that there is a problem with the master table and/or the data dictionary but it gives no indication of the deeper cause.
    Any ideas, anyone?
    Regards, Keith.

    Pl post the complete expdp and impdp commands used.
    Retry expdp or impdp with the EXCLUDE=STATISTICS option.
    MOS Doc 878626.1
    HTH
    Srini

  • ORA-01427 single-row subquery returns more than requested number of rows

    Hi All,
    SR#3-5155460391
    When opening the Expense report form the given error occurs.
    This is happening with only one employee.
    The condition could not be evaluated because of error ORA-01427
    single-row subquery returns more than requested number of rows.
    query is:
    select pea.segment5
    from
    per_all_assignments_f paf,
    pay_personal_payment_methods_f ppm,
    pay_external_accounts pea,
    fnd_application fap,
    fnd_id_flex_structures ffs
    where
    paf.person_id=:employee_id
    and paf.primary_flag='Y'
    and paf.assignment_type='E'
    and trunc(sysdate) between paf.effective_start_date and paf.effective_end_date
    and ppm.assignment_id=paf.assignment_id
    and trunc(sysdate) between ppm.effective_start_date and ppm.effective_end_date
    and ppm.attribute2='Y'
    and pea.external_account_id=ppm.external_account_id
    and pea.id_flex_num=ffs.id_flex_num
    and fap.application_short_name='PAY'
    and ffs.application_id=fap.application_id
    and ffs.id_flex_code='BANK'
    and ffs.id_flex_structure_code='GB_BANK_DETAILS';
    Thanks,
    Shikha
    Edited by: user10456902 on Feb 3, 2012 1:57 AM

    Hi,
    First try to find pea.external_account_id from per_all_people_f,per_all_assignments_f,fnd_application.fnd_id_flex_structures etc
    and then find
    SELECt pea.segment5
    FROM pay_external_accounts pea
    WHERE pea.external_account_id = : external_account_id -- derived from SQL1
    and check how many rows are returned

  • Update query is not working (ora-01427)

    RDBMS 10gr2
    Long story short, I created a column from one table in another because the table it was moved from isn't really needed as all the other information is stored in other tables. With that the original column has values that need to be copied to the new column before the old table is dropped.
    I'm using this update query:
    update bi_req bir
       set bir.job_name =
            (select distinct bij.job_name
               from bi_jobs bij,
                    bi_freq bif,
                    bi_apps bia,
                    bi_req  bir
              where bij.fk_bi_req_id = bir.pk_bi_req_id
                and bia.pk_bi_apps_id = bij.fk_bi_apps_id
                and bif.pk_bi_freq_id = bij.fk_bi_freq_id)
    where bir.job_name is null;If I run the select statement separately, I get the exact results I need however whenever I run the entire statement, I get:
    Error: ORA-01427: single-row subquery returns more than one row

    I removed the extra bi_req from the subquery and that didn't help any.
    If I replace the '=' with IN (also ALL) I get the error message:
    ORA-00927: missing equal signHere is the create table for the table that will soon be dropped:
    CREATE TABLE BI_JOBS
      PK_BI_JOBS_ID  NUMBER                         NOT NULL,
      FK_BI_APPS_ID  NUMBER                         NOT NULL,
      FK_BI_FREQ_ID  NUMBER                         NOT NULL,
      JOB_NAME       VARCHAR2(50 CHAR)              NOT NULL,
      FK_BI_REQ_ID   NUMBER                         NOT NULL
    )and the relevant columns for the table that has the column that needs the values from bi_jobs.job_name
    CREATE TABLE BI_REQ
      PK_BI_REQ_ID   NUMBER                         NOT NULL,
      FK_FREQ_ID     NUMBER                         NOT NULL,
      FK_BI_APPS_ID  NUMBER,
      JOB_NAME       VARCHAR2(50 CHAR)
    )Whatever value that is in bi_jobs.job_name I want in bi_req.job_name assuming that bi_jobs.fk_bi_req_id equals bi_req.pk_bi_req_id

  • ORA-01427 in C# but not in SQL Developer

    Hello everyone!
    I have a query that works perfectly when executed from SQL Developer. However, executing the same query from C# gives error ORA-01427.
    I am using Oracle.DataAccess.dll version 2.111.6.20, which cannot be changed, because the software is distributed and all users would have to install the new driver.
    -- part 1
    with
    mat_stats
    as
    (select
    t1.nr,
    t1.ver,
    t4.stat,
    count( distinct t4.kom_id) as cnt
    from
    table1 t1,
    table2 t2,
    table3 t3,
    table4 t4
    where
    t3.spec_spec_id = t2.spec_id
    and t1.man_id = t2.man_man_id
    and t4.kom_id = t3.kom_kom_id
    group by t1.nr, t1.ver, t4.stat
    order by t1.nr, t1.ver, t4.stat )
    -- part 2
    select distinct
    nr,
    ver,
    -- part 2a
    (select cnt from mat_stats xres
    where xres.nr=nr
    and xres.ver=ver
    and stat='OK') as ok_cnt,
    -- part 2b
    (select cnt from mat_stats xres
    where xres.nr=nr
    and xres.ver=ver
    and stat='TOL') as tol_cnt
    from mat_stats
    The output from part 1 is
    "nr" "ver" "stat" "cnt"
    1 5 "NOK" 4
    1 5 "TOL" 1
    And the output of part2 is (SQL Developer)
    "nr" "ver" "ok_cnt" "tol_cnt
    1 5 "" 1
    What am I doing wrong ? Or is this a known bug ?
    Cheers,
    Chris

    now if the sum is changing the value then I have to ask: are these hitting the same data sources?
    let's change the query around a bit and see if you get the same result
    try this query
    with
    mat_stats
    as
    SELECT 1 NR  ,
           5 VER ,
           'NOK' STAT ,
           4 CNT
    FROM DUAL
    UNION
    SELECT 1 NR  ,
           5 VER ,
           'TOL' STAT ,
           1 CNT
    FROM DUAL
    -- part 2
    select distinct
    nr,
    VER,
    SUM(CASE STAT WHEN 'OK' THEN CNT ELSE 0 END) OVER() OK_CNT,
    SUM(CASE STAT WHEN 'TOL' THEN CNT ELSE 0 END) OVER() tol_cnt
    FROM MAT_STATS ;
    NR                     VER                    OK_CNT                 TOL_CNT               
    1                      5                      0                      1                      note I just "faked" your data based on your initial results, so you ought to be able to be able to change the with clause back to yours.
    Run a full select in C# and look over the result set (fill a datatable and do a row.count then compare to a full select in Developer and see if the row counts are the same.

  • ORA-01427: single-row subquery returns more than one row

    I have a problem something like this:
    table A
    id col1 after_update
    1 ? 11
    2 ? 22
    3 ? 33
    3 ? 44
    3 ? 55
    4 ? 66
    5 ? 88
    5 ? ? /* won't be updated */
    6 ? 99
    7 ? null /* updated to null */
    9 ? 20
    table B
    id col2
    1 11
    2 22
    3 33
    3 44
    3 55
    4 66
    4 77
    5 88
    6 99
    8 10
    9 20
    When I try the query:
    update table A
    set col1 = (select distinct col2 from table B) it gives me the error ORA-01427: single-row subquery returns more than one row
    When I try the query:
    update (select x.col1 x_col1,y.col2 y_col2
    from (select id,col1,row_number() over (partition by id order by null /*col1*/) rn
    from table_a
    ) x,
    (select id,col2,row_number() over (partition by id order by col2) rn
    from table_b
    ) y
    where x.id = y.id
    and x.rn = y.rn
    set x_col1 = y_col2
    it gives me an error saying ora-01779 :cannot modify a column which maps to a non key- preserved table. It shows the same even when I add the key to the tables.
    My Database version is Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
    Kindly help.

    Another way, not waterproof too relay on rowid, but in your case it could work.
    You have to verify it by yourself
    update test_a aa
    set col1 =
    (select b.col1 from
    (select
    id, col1
    ,row_number() over
      (partition by id order by col1) rn
    from table_b) b,
    ( select
      rowid, id, col1
    ,row_number() over (partition by id order by col1) sort_order
    from test_a
    ) a
    where
    a.id=b.id
    and
    sort_order = rn
    and
    aa.rowid=a.rowid
    )Edited by: chris227 on 03.04.2013 06:42
    Table name corrected

  • ORA-01427: single-row subquery returns more than one row HELP

    I need to update baemployee.Stock_nbr field with select substr(C.CHECK_DIGIT, 3, 10)
    from EMP_CHECK_DIG c where C.EMPLOYEE = e.EMPLOYEE
    Please help.
    update baemployee e
    set Stock_nbr = (select substr(C.CHECK_DIGIT, 3, 10)
    from EMP_CHECK_DIG c where C.EMPLOYEE = e.EMPLOYEE)
    where exists
    (select C.CHECK_DIGIT
    from EMP_CHECK_DIG c where C.EMPLOYEE = e.EMPLOYEE)
    and exists (select 1 from EMPLOYEE ee where ee.employee = e.employee and ee.emp_status like 'A%');
    ORA-01427: single-row subquery returns more than one row

    Hi,
    Welcome to the forum!
    Whenever you have a question, please post some sample data, so that people can re-create the problem and test their solutions.
    CREATE TABLE and INSERT statements, like the ones below, are great:
    CREATE TABLE      baemployee
    (     employee     NUMBER (4)
    ,     stock_nbr     VARCHAR2 (10)
    INSERT INTO baemployee (employee, stock_nbr) VALUES (1234, 'FUBAR');
    CREATE TABLE     employee
    (     employee     NUMBER (4)
    ,     emp_status     VARCHAR2 (10)
    INSERT INTO employee (employee, emp_status) VALUES (1234, 'ACTIVE');CREATE TABLE AS is good, too:
    CREATE TABLE     emp_check_dig
    AS          SELECT  1234 AS employee, 'AA1234567890ZZZ' AS check_digit     FROM dual
    UNION ALL     SELECT  1234,            'AA2121212121ZZZ'               FROM dual
    ;Also post the results you want from that data. In this case, the results would be the contents of the baemployee table after you run the UPDATE.
    Would you want:
    employee  stock_nbr
    1234       1234567890or would you want
    employee  stock_nbr
    1234       2121212121If you run the UPDATE statement you posted with the data above, you'll get the "ORA-01427: single-row subquery returns more than one row" error, and you can see what causes it: there is more than one row from emp_check_dig that could be used to UPDATE the same row of baemployee. Say what you want to do in this situation (and why), and someone will help you find a way to do it.

  • ORA-01427: single-row subquery returns more than one row -- no solution

    Hello to all:
    I have to tables:
    Table a anwender (Email,Dept). --> all fields are filled
    Table b dingo (Name,email,dept) --> all fields are filled
    I now want to update the table a with the data from table b:
    update anwender a set a.abteilung = ( select distinct b.abteilung from dingo b where b.email = a.email);
    Then I got the error: ORA-01427: single-row subquery returns more than one row
    Every dept is about 100x in the database, so it is clear that i got more than one row back. But how can I update the table now?

    Okay, I got several duplicates, and I deletet a lot of data in my database.
    Now I want to remove all entries with more than one departments per mail adresses.
    a
    select email,count(abteilung) from dingo group by email having count(abteilung)>1 order by count(abteilung)
    shows me all the fake mailadresses.
    But a
    delete from dingo where email in (select email,count(abteilung) from dingo group by email having count(abteilung)>1 order by count(abteilung) );
    gives me a
    SQL Error: ORA-00907: missing right parenthesis
    I´m very confused now ...
    Oops, now I got the solution:
    delete from dingo where email in (select email from (select email,count(abteilung) from dingo group by email having count(abteilung)>1 )) ;
    Edited by: user8309218 on Dec 18, 2009 6:24 AM

Maybe you are looking for

  • Relationship between "Account Group" and "GL Acct. number".

    I need to create a report that lists the GL Account numbers according to selection screen parameter "Account Group" . Hi i need to find a way\(tables and fields) between the  "Account Group"  and the "GL Account number". to view "Account Group"  go t

  • Create dropdown that emails based on info

    I am creating an email dropdown list that I want to "user" to push the button and based off the airport code menu item that is selected directs to whom the email gets sent. (Each menu item has more than one email attached to it.) I have already disco

  • Printer won't work after upgrade

    Hi.  I have an HP Deskjet 460 portable printer.  I have upgraded to Lion and now the printer is not recognised.  When I inserted the original installation CD, it stated that Power PC applications are no longer supported.  Any way I can get this print

  • Links generate javascript errors?

    I am getting the following error from all links on a .faces page: 'elements' is null or not an object Any idea what can cause this? I am btw using: myfaces-api 1.1.4-SNAPSHOT myfaces-impl 1.1.4-SNAPSHOT myfaces-shared-impl 2.0.2-SNAPSHOT tomahawk 1.1

  • Deleting and updating database table

    hi all, i have to update the database table based on my internal table(both having same structure). my database has 2 records having a key field 1 and 2 respectively.(2 records) and my internal table has records with key fields 3, 4 and 5 respectivel