Invalid query tree 300-33 - SQL Error 8180 @ Query

Hello,
@ my Grid i geht the error Invalid query tree 300-33 - SQL Error 8180 @ the Select Statement.
oGrid= ( ( SAPbouiCOM.Grid)(oItem.Specific));
                    oForm.DataSources.DataTables.Add("myGrid");
                    oForm.DataSources.DataTables.Item(0).ExecuteQuery("select U_NAG_CardCode, U_NAG_CardName, U_NAG_ProjName, U_NAG_ProjNr, U_NAG_ProjAbge, U_NAG_ProjStart from SBODemoDE.dbo.NAG_PROJEKTEE");
                    oGrid.DataTable = oForm.DataSources.DataTables.Item("myGrid");
I dont know what´s wrong.
When i execute this in SQL-Managmant Studio , it works.
pls Help
Thanks
Dhomas

Hi Dhomas,
How did you solve this problem? I have the same and need some help.
regards
Ela

Similar Messages

  • DataTabe ExecuteQuery - Invalid Query Tree [300-33]

    HI,
    Like the subject suggest,
    when I try to execute a store procedure with executeQuery method from Grid Object, the calling of this method return me the subject error (Invalid Query Tree [300-33])
    but under "SQL Managment Studio" it works fine.
    For information the store procedure produce not many records about 30000 and it create TEMP TABLE, CURSOR etc..etc..
    How can i solve? Because the store procedure run correctly under "SQL Managment Studio".
    Best regards

    Hi,
    When you run your stored procedue in SQL Studio Management are there any messages returned (ie in the Messages tab in the results panel)? It can cause errors if there are any warnings returned during the procedure. Also, make sure you are setting nocount on at the start of your procedure and setting it back to off just before you return the recordset that you want to return to SBO.
    Kind Regards,
    Owen

  • SQL Error in Query Editor

    Hello All,
    I am new to the Sun Java Studio Creator and in the tutorial Linking Components to Data tutorial.
    I created my own datasource which is a MS Access database.
    I have a simple look up table and I dragged the table onto the dropdown list as instructed and nothing happened. The dialog box the tutorial said would appear didn't appear.
    So I right clicked on the rowset added on to the page to get in the Query Editor.
    When opening the Query Editor, I get an error:
    Error Connecting to Database:
    java.sql.SQLException:[Microsoft][ODBC Driver Manager] does not support this function
    The SQL reads in the editor is something like this:
    SELECT ALL tableName.Column 1 FROM tblName
    Why does it automatically put the "All". Is that standard SQL? I don't think so. But I guess I could be wrong.
    I have not seen this used in other SQL. I've used T-SQL, PL/SQL, ACCESS SQL and never had I seen the "ALL" preceding the columns of the table.
    Quite frustrating when something as simple as a simple SELECT statement does not work when you're trying to learn a new tool.
    When adding the datasource, the test connection is fine. The query editor sees all of my tables in the MS Access database and all of the added table's columns.
    Am I missing a driver, or update to a driver? Or is this Sun's way of saying "Screw Your Microsoft database use something that we want you to use!!"
    Which is not pretty cool.
    I'm a newbie with this tool, but I have been coding for a while using MICROSOFT products. And have not had the same problems as this. Or at least getting help through documentation.
    I'm just venting here. I want to learn this tool. And when simple processes doesn't work. And documentation in why it's now working is hard to find, it gets quite frustrating.
    Anyone's help would be greatly appreciated.
    I truly appreciate your time for reading through my frustration.

    Hi,
    Please check the driver and also take a look at the link for "Supported Database Servers and JDBC Drivers"
    http://www.sun.com/software/products/jscreator/sysreq.xml
    regards
    MJ

  • Invalid query tree[300-33] the sql error 8180????????

    hi  alll
    when i click on  my  own creating form the  above  error is  showing......?????
    Private Sub drawform()
            Dim oitem As SAPbouiCOM.Item
            Dim oCombopptype As SAPbouiCOM.ComboBox
            Try
                LoadFromXML("PayPeriodMaster.srf")
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
            oform = SBO_Application.Forms.Item("MPPeriod")
            ''''''' combo for code
            oitem = oform.Items.Item("txtcode")
            oCodetext = oitem.Specific
            'AddpayCodeCombo(cmbcode)
            '''''''''combo for pay type
            oitem = oform.Items.Item("cmbppt")
            oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Employee")
            oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Labour")
            oCombopptype = oitem.Specific
            ''''''' notes''''''''''''
            oitem = oform.Items.Item("txtNotes")
            noteedittext = oitem.Specific
            '''''''' startdate
            oitem = oform.Items.Item("txtSDate")
            starD = oitem.Specific
            ''''''''''end date
            oitem = oform.Items.Item("txtEDate")
            endD = oitem.Specific
            ''''''''''days in period
            oitem = oform.Items.Item("txtDPrd")
            daystext = oitem.Specific
            '''''''''''' working days
            oitem = oform.Items.Item("txtWDays")
            worktext = oitem.Specific
        End Sub
    could u help me any body......

    hi
    i think that error is not because of the code you have pasted here.
    it seems like there are some sql queries in your code.
    Please check them in Query analyzer with some test values.
    if this queries are running properly then the problem might be at concatenating the values (while building the query)
    and there are some problems in your code too i.e
    HERE
    oitem = oform.Items.Item("cmbppt")
    oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Employee")
    oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Labour")
    oCombopptype = oitem.Specific
    IT SHOULD BE LIKE THIS
    oitem = oform.Items.Item("cmbppt")
    oCombopptype = oitem.Specific
    //Valid values should be different
    oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Employee")
    oCombopptype.ValidValues.Add(CStr(4), "Labour")-- GIVE Different valid value
    Hope it helps you
    Regards
    Vishnu

  • ORABPEL-9708 Error while querying workflow task WFTask. Caused by:ORA-00936

    Hi,
    I am trying to integrate my Primavera p6 web version8.0 with the BPM setup 11.1.1.3 . The BPM is setup fine.
    But when I integrated with primavera p6 and on load of workflows portlet of p6 web where the BPM tasks are listed, I am getting following exception in BPM console:
    Error while querying workflow task WFTask.
    Check the underlying exception and the database connection information. If the error persists, contact Oracle Support Services. .
    ORABPEL-9708
    Error while querying workflow task WFTask .
    Error while querying workflow task WFTask.
    Check the underlying exception and the database connection information. If the error persists, contact Oracle Support Services. .
    at oracle.bpel.services.workflow.repos.driver.WFTask.getWFTask(WFTask.java:2181)
    at oracle.bpel.services.workflow.repos.driver.PersistencyService.getWFTask(PersistencyService.java:907)
    at oracle.bpel.services.workflow.query.impl.TaskQueryService.queryTasks(TaskQueryService.java:751)
    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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.bpel.services.workflow.common.WorkflowServiceCacheEventAdvice.invoke(WorkflowServiceCacheEventAdvice.java:89)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at oracle.bpel.services.workflow.test.workflow.ExceptionTestCaseBuilder.invoke(ExceptionTestCaseBuilder.java:155)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at oracle.bpel.services.common.dms.MethodEventAspect.invoke(MethodEventAspect.java:70)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at oracle.bpel.services.common.dms.MethodPhaseEventAspect.invoke(MethodPhaseEventAspect.java:82)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy220.queryTasks(Unknown Source)
    at oracle.bpel.services.workflow.query.ejb.TaskQueryServiceBean.queryTasks(TaskQueryServiceBean.java:120)
    at oracle.bpel.services.workflow.query.ejb.TaskQueryService_oz1ipg_EOImpl.queryTasks(TaskQueryService_oz1ipg_EOImpl.java:1019)
    at oracle.bpel.services.workflow.query.ejb.TaskQueryService_oz1ipg_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused By: java.sql.SQLSyntaxErrorException: ORA-00936: missing expression
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:95)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:135)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:210)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:473)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:423)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1095)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:201)
    at oracle.jdbc.driver.T4CCallableStatement.executeForDescribe(T4CCallableStatement.java:864)
    at oracle.jdbc.driver.T4CCallableStatement.executeMaybeDescribe(T4CCallableStatement.java:948)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1335)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3568)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
    at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:135)
    at oracle.bpel.services.workflow.repos.driver.WFTask.getWFTask(WFTask.java:2153)
    at oracle.bpel.services.workflow.repos.driver.PersistencyService.getWFTask(PersistencyService.java:907)
    at oracle.bpel.services.workflow.query.impl.TaskQueryService.queryTasks(TaskQueryService.java:751)
    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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.bpel.services.workflow.common.WorkflowServiceCacheEventAdvice.invoke(WorkflowServiceCacheEventAdvice.java:89)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at oracle.bpel.services.workflow.test.workflow.ExceptionTestCaseBuilder.invoke(ExceptionTestCaseBuilder.java:155)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at oracle.bpel.services.common.dms.MethodEventAspect.invoke(MethodEventAspect.java:70)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at oracle.bpel.services.common.dms.MethodPhaseEventAspect.invoke(MethodPhaseEventAspect.java:82)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy220.queryTasks(Unknown Source)
    at oracle.bpel.services.workflow.query.ejb.TaskQueryServiceBean.queryTasks(TaskQueryServiceBean.java:120)
    at oracle.bpel.services.workflow.query.ejb.TaskQueryService_oz1ipg_EOImpl.queryTasks(TaskQueryService_oz1ipg_EOImpl.java:1019)
    at oracle.bpel.services.workflow.query.ejb.TaskQueryService_oz1ipg_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Could anybody please help me out in resolving the issue?
    Thanks and Regards,
    Krish

    I have the same problem with P6 R8 integration with BPM 11g (running on WL 10.3.5.0). Any sugestions how to solve this?

  • Error while querying workflow message attributes for task

    Can some one please help me with this error?
    I get this error when I submit a task in worklist app. I have figure out that it is causing due to one payload in the table in the task. If remove that payload I am able to submit the task.
    Error while querying workflow message attributes for task a99d1cf3-5e91-4c4a-8660-aeae91bfbec0 with version 5.
    Check the underlying exception and the database connection information. If the error persists, contact Oracle Support Services.
    oracle.jbo.JboException: Error while querying workflow message attributes.
    Error while querying workflow message attributes for task a99d1cf3-5e91-4c4a-8660-aeae91bfbec0 with version 5.
    Check the underlying exception and the database connection information. If the error persists, contact Oracle Support Services.
         at oracle.bpel.services.datacontrol.XSDDataControl.invokeOperation(XSDDataControl.java:460)
         at oracle.adf.model.bean.DCBeanDataControl.invokeMethod(DCBeanDataControl.java:430)
         at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:261)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1635)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2144)
         at oracle.adf.model.bean.DCBeanDataControl.invokeOperation(DCBeanDataControl.java:467)
         at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:307)

    Can anybody help me on this?
    I did some google but I get this only which is not much helpful.
    http://download.oracle.com/docs/cd/E14571_01/core.1111/e10113/chapter_bpm_messages.htm

  • SQL Server Agent Job And Database Mail - Error formatting query, probably invalid paramters

    We have a stored procedure that we are trying to call with a SQL Server Agent Job. The stored procedure calls Database Mail. This is SQL 2008. The execute task is simply:
    USE [Production]
    GO
    EXEC [dbo].[JOB_EMAIL_SCHEDULED_REPORTS]
    GO
    When the job runs, it is erroring out immediately, with the error:
    Execute as user: NT AUTHORITY\NETWORK SERVICE. Error formatting query, probably invalid paramters [SQLSTATE 42000] (Error 22050). The step failed.
    When we go into SQL Server Manager and just execute the SQL query, it works though. Something within the SQL Server Agent job,  and Database Mail is causing problems. Any ideas? Thanks.

    Justin,
    If you use SSMS then the procedure is executed under a different user when compared to running using a SQL Server Agent Job.
    Isolate the problem by running a SQL Server agent job that sends a mail. Also check if the NT Authority\Network Service account is
    in good standing. Look at the below thread with a similar problem that had an expired account.
    http://social.msdn.microsoft.com/Forums/en/sqltools/thread/bac7ecee-a156-4313-b532-ba15813a0700
    http://SankarReddy.com/

  • Error [hyt00] [microsoft][odbc sql server driver] query timeout expired

    I have the below network setup:-
    1. Its a simple network at my father's office at a small town called Ichalkaranji (District - Kolhapur, Maharashtra).
    2. We are using private network range 192.168.1.xxx with two Windows Server 2003 Enterprise Edition with SP2 licensed copies and 15 local Windows 7 clients who are only using Server A.
    3. The network is having a TP-Link Braodband Router Connected to internet with the IP 192.168.1.1.
    4. Both there Windows Server 2003 Enterprise Edition with SP2 are running separate SQL Server 2005 Express with Advanced Services, you can treat them as Server A (Problematic Server with IP of 192.168.1.2) 
    and Server B (this is not having any issue with IP of 192.168.1.3).
    5. Server A is also being used by 6 Remote users from our Kolkata office using DDNS facility through the NO IP client software which installed separately on both the servers. Kolkata remote users
    do not use OR access the Server B.
    6. Server B is being used by only 2 Remote users from our Erode office (Under Salem District, Tamilnadu) using DDNS facility through the NO IP client software which installed separately on both
    the servers. Erode remote users do not use OR access the Server A.
    7. The front end application which running separately on both the servers have been developed in VB by a local vendor at Ichalkaranji (District - Kolhapur, Maharashtra).
    8. Both Servers are having the same database structure in terms of design and tables format. Only difference is that both the servers are being used separately.
    9. This error OR problem is only related to Server A, where on the clients we get the message "error [hyt00] [microsoft][odbc sql server driver] query timeout expired" every now and then.
    10. We have to frequently reboot the server whenever we get this message on the client machines. May be after rebooting every thing works perfectly for 2 hours / 5 Hours / may be one full day but
    the the error will come back for sure.
    11. Current Database back up size on Server A is around 35 GB and take around 1 hour 15 minutes daily to take the back up.
    12. Current Database back up size on Server B is around 3 GB and take around 5 to 10 minutes daily to take the back up.
    13. One thing I have noticed is that when ever we reboot Server A, for some time sqlsrvr.exe file will show memory usage of 200 to 300 MBs but it will start using slowly, what i understand is that
    this is the way SQL Server works.
    14. Both the Servers are also running Quick heal Antivirus Server Edition separate licensed copies also.
    15. Server B is also running Tally ERP 9 Licenses copy which is being used locally by 15 users of Ichalkaranji (District - Kolhapur, Maharashtra) same users
    Can any one help to resolve this issue. Any help will be highly appreciated.

    The error message "query timeout expired" occurs, because by default many APIs, including ODBC only waits for 30 seconds for SQL Server to send any output. If no data has been seen for this period of time, they tell SQL Server to cancel execution
    and return this error to the caller.
    This timeout could be seen as a token that the query is taking too long time to execute and this needs to be fixed. But it can also be a pain in the rear parts, if you are content with a report taking five minutes, because you only run it once a day.
    The simplest way to get rid of the error is to set the timeout to zero, which means "wait forever". This is something your vendor would have to do. This may, however, not resolve the problem, as the users may just find that the application is hanging.
    To wit, there are two reasons why the query takes more than 30 seconds to complete. One is that there is simply that much work to do. This can be reduced by adding indexes or by doing other tuning, if the execution time is not acceptable. The other possibility
    is blocking. That is, there is a process blocking this query from completing. This is much more likely to require attention.
    It is not clear to me, whether the vendor has developed the database part as well. In this case, you should probably call the vendor's support desk to have them to sort this out.
    Finally, I am little puzzled. You say that you are using Express Edition, but one of the databases is 35 GB in size. 35 GB is far above the limit for Express Edition.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • 7.8.01.17: "Bushy trees"? SQL-Error -7096

    While trying to do a normal search function in transaction SE30 the system dumps with (gave me a good first laugh):
    **LOG BY4=> sql error -7069  performing PRE on table OBJS       [dbtran#4 @ 7588] [dbtran  7588 ]
    **LOG BY0=> POS(1) Outer/Semi join with bushy trees not allowed [dbtran#4 @ 7588] [dbtran  7588 ]
    I fiddled already with the parameters
    EnableOuterJoinOptimization NO
    EnableOnePhaseJoin NO
    but that all doesn't really help.
    The statement is the following:
    SELECT
      T_00 . "OBJECTNAME" , T_01 . "DDTEXT" , T_00 . "OBJECTTYPE" ,
      T_02 . "MAINFLAG"
    FROM
      "OBJS" T_00 INNER JOIN "DD25V" T_01 ON T_00 . "OBJECTNAME" = T_01 . "VIEWNAME"
      LEFT OUTER JOIN "DD02L" T_02 ON T_02 . "TABNAME" = T_01 . "VIEWNAME" AND T_02
      . "AS4LOCAL" = T_01 . "AS4LOCAL" AND T_02 . "AS4VERS" = T_01 . "AS4VERS"
    WHERE
      T_00 . "OBJECTTYPE" = ? AND T_00 . "TABNAME" = ? AND T_00 . "DDIC" = ? AND
      T_01 . "AS4LOCAL" = ?
    Any idea which one of the join parameters needs to be adapted? Or is this a query rewrite problem? Can't check that using ST05 (PREPARE-EXECUTE).
    Markus

    Hi Holger,
    thank you for that hint - I tried immediately but - this doesn't make a change unfortunately, the error ist still occuring.
    sqlcli T01=> select rulename,active from queryrewriterules
    | RULENAME                         | ACTIVE |
    | -------------------------------- | ------ |
    | AddLocalPredicates               | YES    |
    | CombineExternalSelects           | YES    |
    | CombineToAnyOrAll                | YES    |
    | ConvertExceptToAntiSemiJoin      | YES    |
    | ConvertIntersectToSemiJoin       | YES    |
    | ConvertUnionToORQuery            | YES    |
    | DistinctPullUp                   | YES    |
    | DistinctPushDown                 | YES    |
    | FlattenSubqueries                | YES    |
    | MergeQueries                     | YES    |
    | OptimizeAggregates               | YES    |
    | OptimizeExpressions              | YES    |
    | OptimizeJoins                    | NO     |
    | OptimizePredicates               | YES    |
    | OptimizeSubqueries               | YES    |
    | PushDownJoins                    | YES    |
    | PushDownPredicates               | YES    |
    | PushDownProjection               | YES    |
    | RemoveDispensableConstants       | YES    |
    | RemoveDispensableGroupBy         | YES    |
    | RemoveDispensableOrderBy         | YES    |
    | ReorderJoins                     | YES    |
    | ReorderPredicates                | YES    |
    | ReorderUnions                    | YES    |
    | SubstituteBushyJoins             | YES    |
    | SubstituteViews                  | YES    |
    26 rows selected (1649 usec)
    I meanwhile opened an OSS call (0700700/2010)
    Markus

  • The Query returns a JBO Sql Exeptions of Invalid number

    Here is the query which returns the Invalid number exception on a R12 environment -
    SELECT feb.entity_id,
    rel.parent_entity_id,
    fetl.entity_name,
    pfetl.entity_name parent_entity_name,
    ccytl.currency_code,
    ccytl.name AS currency_name,
    fettl.entity_type_name,
    fettl.entity_type_code,
    rel.cons_relationship_id,
    decode( fettl.entity_type_code,
    'E', to_number(''),
    decode( operassoc.parent_entity_id,
    to_number(''), rel.ownership_percent,
    to_number(''))) ownership_percent,
    ttl.treatment_name,
    cttl.curr_treatment_name,
    decode( fettl.entity_type_code,
    'O', 'Y',
    'X', 'Y',
    decode( rel.cons_relationship_id,
    '', 'Y',
    'N')) AS details_icon_displayed,
    decode( fettl.entity_type_code,
    'E', 'N',
    'O', decode(feb.entity_id,
    operassoc.child_entity_id, 'N',
    'Y'),
    'Y') AS add_entity_icon_displayed,
    decode( fettl.entity_type_code,
    'E', 'N',
    'C', decode( rel.cons_relationship_id,
    '', 'N',
    'Y'),
    decode( operassoc.parent_entity_id,
    '', 'Y',
    'N')) AS move_remove_icon_displayed,
    decode( fettl.entity_type_code,
    'E', 'N',
    'C', decode( rel.cons_relationship_id,
    '', decode( childassoc.child_entity_id,
    '', 'N',
    'Y'),
    'Y'),
    decode( operassoc.parent_entity_id,
    '', 'Y',
    'N')) AS create_update_icon_displayed,
    decode( fettl.entity_type_code,
    'E', 'N',
    'C', decode( rel.cons_relationship_id,
    '', 'N',
    'Y'),
    decode( operassoc.parent_entity_id,
    '', 'Y',
    'N')) AS update_update_icon_displayed,
    imageattr.entity_image,
    decode(imageattr.entity_image, '', 'N', 'Y') entity_image_displayed,
    rel.end_date,
    decode(rel.cons_relationship_id, :0, 'Y', 'N') blue_dot_displayed,
    decode(operassoc.parent_entity_id, '', 'Ownership', 'ParentText') ownership_switcher
    FROM FEM_ENTITIES_B feb,
    FEM_ENTITIES_TL fetl,
    FEM_ENTITIES_TL pfetl,
    GCS_ENTITY_CONS_ATTRS eca,
    FND_CURRENCIES_TL ccytl,
    FEM_ENTITIES_ATTR fetea,
    FEM_DIM_ATTRIBUTES_B fetda,
    FEM_DIM_ATTR_VERSIONS_B fet_dav,
    FEM_ENTITY_TYPES_TL fettl,
    GCS_CONS_RELATIONSHIPS rel,
    GCS_TREATMENTS_TL ttl,
    GCS_CURR_TREATMENTS_TL cttl,
    (SELECT operea.entity_id AS parent_entity_id,
    operea.dim_attribute_numeric_member AS child_entity_id
    FROM FEM_ENTITIES_ATTR operea,
    FEM_DIM_ATTRIBUTES_B operda,
    FEM_DIM_ATTR_VERSIONS_B oper_dav
    WHERE operda.attribute_varchar_label = 'OPERATING_ENTITY'
    AND operda.attribute_id = operea.attribute_id
    AND oper_dav.attribute_id = operda.attribute_id
    AND oper_dav.default_version_flag = 'Y'
    AND oper_dav.version_id = operea.version_id) operassoc,
    (SELECT operea.entity_id AS parent_entity_id,
    operea.dim_attribute_numeric_member AS child_entity_id
    FROM FEM_ENTITIES_ATTR operea,
    FEM_DIM_ATTRIBUTES_B operda,
    FEM_DIM_ATTR_VERSIONS_B oper_dav
    WHERE operda.attribute_varchar_label = 'OPERATING_ENTITY'
    AND operda.attribute_id = operea.attribute_id
    AND oper_dav.attribute_id = operda.attribute_id
    AND oper_dav.default_version_flag = 'Y'
    AND oper_dav.version_id = operea.version_id) childassoc,
    (SELECT imageea.entity_id,
    imageea.varchar_assign_value AS entity_image
    FROM FEM_ENTITIES_ATTR imageea,
    FEM_DIM_ATTRIBUTES_B imageda,
    FEM_DIM_ATTR_VERSIONS_B image_dav
    WHERE imageda.attribute_varchar_label = 'IMAGE_NAME'
    AND imageda.attribute_id = imageea.attribute_id
    AND image_dav.attribute_id = imageda.attribute_id
    AND image_dav.default_version_flag = 'Y'
    AND image_dav.version_id = imageea.version_id) imageattr
    WHERE feb.entity_id = fetl.entity_id
    AND fetl.language = userenv('LANG')
    AND eca.entity_id (+)= feb.entity_id
    AND eca.hierarchy_id (+)= :1
    AND ccytl.currency_code (+)= eca.currency_code
    AND ccytl.language (+)= userenv('LANG')
    AND fetea.entity_id = feb.entity_id
    AND fetea.attribute_id = fetda.attribute_id
    AND fetda.attribute_varchar_label = 'ENTITY_TYPE_CODE'
    AND fet_dav.attribute_id = fetda.attribute_id
    AND fet_dav.default_version_flag = 'Y'
    AND fet_dav.version_id = fetea.version_id
    AND fettl.entity_type_code = fetea.dim_attribute_varchar_member
    AND fettl.language = userenv('LANG')
    AND rel.child_entity_id (+)= feb.entity_id
    AND rel.hierarchy_id (+)= :2
    AND rel.actual_ownership_flag (+)= 'Y'
    AND pfetl.entity_id (+)= rel.parent_entity_id
    AND pfetl.language (+)= userenv('LANG')
    AND ttl.treatment_id (+)= rel.treatment_id
    AND ttl.language (+)= userenv('LANG')
    AND cttl.curr_treatment_id (+)= rel.curr_treatment_id
    AND cttl.language (+)= userenv('LANG')
    AND operassoc.child_entity_id (+)= rel.child_entity_id
    AND operassoc.parent_entity_id (+)= rel.parent_entity_id
    AND childassoc.parent_entity_id (+)= feb.entity_id
    AND imageattr.entity_id (+)= feb.entity_id
    AND (rel.start_date IS NULL OR rel.start_date <= nvl(:3, rel.start_date))
    AND (rel.end_date IS NULL OR rel.end_date >= nvl(:4, rel.end_date))
    ORDER BY decode( operassoc.parent_entity_id,
    '', decode( entity_type_code,
    'O', 2,
    'C', 3,
    'E', 4,
    999),
    1),
    entity_name
    Same query returns correct results in 11i environment.
    This query fails at the executeQueryForCollection method.
    Any ideas why?
    Thanks - Alpi
    Edited by: user581082 on Sep 17, 2009 1:16 AM

    Here is the full Error Stack -
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT     feb.entity_id,
         rel.parent_entity_id,
         fetl.entity_name,
         pfetl.entity_name parent_entity_name,
         ccytl.currency_code,
         ccytl.name AS currency_name,
         fettl.entity_type_name,
         fettl.entity_type_code,
         rel.cons_relationship_id,
         decode(     fettl.entity_type_code,
              'E', to_number(''),
              decode(     operassoc.parent_entity_id,
                   to_number(''), rel.ownership_percent,
                   to_number(''))) ownership_percent,
         ttl.treatment_name,
         cttl.curr_treatment_name,
         decode(     fettl.entity_type_code,
              'O', 'Y',
              'X', 'Y',
              decode(     rel.cons_relationship_id,
                   '', 'Y',
                   'N')) AS details_icon_displayed,
         decode(     fettl.entity_type_code,
              'E', 'N',
              'O', decode(feb.entity_id,
    operassoc.child_entity_id, 'N',
    'Y'),
              'Y') AS add_entity_icon_displayed,
         decode(     fettl.entity_type_code,
              'E', 'N',
              'C', decode(     rel.cons_relationship_id,
                        '', 'N',
                        'Y'),
              decode(     operassoc.parent_entity_id,
                   '', 'Y',
                   'N')) AS move_remove_icon_displayed,
         decode(     fettl.entity_type_code,
              'E', 'N',
              'C', decode(     rel.cons_relationship_id,
                        '', decode(     childassoc.child_entity_id,
                                  '', 'N',
                                  'Y'),
                        'Y'),
              decode(     operassoc.parent_entity_id,
                   '', 'Y',
                   'N')) AS create_update_icon_displayed,
         decode(     fettl.entity_type_code,
              'E', 'N',
              'C', decode(     rel.cons_relationship_id,
                        '', 'N',
                        'Y'),
              decode(     operassoc.parent_entity_id,
                   '', 'Y',
                   'N')) AS update_update_icon_displayed,
         imageattr.entity_image,
         decode(imageattr.entity_image, '', 'N', 'Y') entity_image_displayed,
         rel.end_date,
         decode(rel.cons_relationship_id, :0, 'Y', 'N') blue_dot_displayed,
         decode(operassoc.parent_entity_id, '', 'Ownership', 'ParentText') ownership_switcher
    FROM     FEM_ENTITIES_B feb,
         FEM_ENTITIES_TL fetl,
         FEM_ENTITIES_TL pfetl,
         GCS_ENTITY_CONS_ATTRS eca,
         FND_CURRENCIES_TL ccytl,
         FEM_ENTITIES_ATTR fetea,
         FEM_DIM_ATTRIBUTES_B fetda,
         FEM_DIM_ATTR_VERSIONS_B fet_dav,
         FEM_ENTITY_TYPES_TL fettl,
         GCS_CONS_RELATIONSHIPS rel,
         GCS_TREATMENTS_TL ttl,
         GCS_CURR_TREATMENTS_TL cttl,
         (SELECT     operea.entity_id AS parent_entity_id,
              operea.dim_attribute_numeric_member AS child_entity_id
         FROM     FEM_ENTITIES_ATTR operea,
              FEM_DIM_ATTRIBUTES_B operda,
              FEM_DIM_ATTR_VERSIONS_B oper_dav
         WHERE     operda.attribute_varchar_label = 'OPERATING_ENTITY'
         AND     operda.attribute_id = operea.attribute_id
         AND     oper_dav.attribute_id = operda.attribute_id
         AND     oper_dav.default_version_flag = 'Y'
         AND     oper_dav.version_id = operea.version_id) operassoc,
         (SELECT     operea.entity_id AS parent_entity_id,
              operea.dim_attribute_numeric_member AS child_entity_id
         FROM     FEM_ENTITIES_ATTR operea,
              FEM_DIM_ATTRIBUTES_B operda,
              FEM_DIM_ATTR_VERSIONS_B oper_dav
         WHERE     operda.attribute_varchar_label = 'OPERATING_ENTITY'
         AND     operda.attribute_id = operea.attribute_id
         AND     oper_dav.attribute_id = operda.attribute_id
         AND     oper_dav.default_version_flag = 'Y'
         AND     oper_dav.version_id = operea.version_id) childassoc,
         (SELECT     imageea.entity_id,
              imageea.varchar_assign_value AS entity_image
         FROM     FEM_ENTITIES_ATTR imageea,
              FEM_DIM_ATTRIBUTES_B imageda,
              FEM_DIM_ATTR_VERSIONS_B image_dav
         WHERE     imageda.attribute_varchar_label = 'IMAGE_NAME'
         AND     imageda.attribute_id = imageea.attribute_id
         AND     image_dav.attribute_id = imageda.attribute_id
         AND     image_dav.default_version_flag = 'Y'
         AND     image_dav.version_id = imageea.version_id) imageattr
    WHERE     feb.entity_id = fetl.entity_id
    AND     fetl.language = userenv('LANG')
    AND     eca.entity_id (+)= feb.entity_id
    AND     eca.hierarchy_id (+)= :1
    AND     ccytl.currency_code (+)= eca.currency_code
    AND     ccytl.language (+)= userenv('LANG')
    AND     fetea.entity_id = feb.entity_id
    AND     fetea.attribute_id = fetda.attribute_id
    AND     fetda.attribute_varchar_label = 'ENTITY_TYPE_CODE'
    AND     fet_dav.attribute_id = fetda.attribute_id
    AND     fet_dav.default_version_flag = 'Y'
    AND     fet_dav.version_id = fetea.version_id
    AND     fettl.entity_type_code = fetea.dim_attribute_varchar_member
    AND     fettl.language = userenv('LANG')
    AND     rel.child_entity_id (+)= feb.entity_id
    AND     rel.hierarchy_id (+)= :2
    AND rel.actual_ownership_flag (+)= 'Y'
    AND     pfetl.entity_id (+)= rel.parent_entity_id
    AND     pfetl.language (+)= userenv('LANG')
    AND     ttl.treatment_id (+)= rel.treatment_id
    AND     ttl.language (+)= userenv('LANG')
    AND     cttl.curr_treatment_id (+)= rel.curr_treatment_id
    AND     cttl.language (+)= userenv('LANG')
    AND     operassoc.child_entity_id (+)= rel.child_entity_id
    AND     operassoc.parent_entity_id (+)= rel.parent_entity_id
    AND     childassoc.parent_entity_id (+)= feb.entity_id
    AND     imageattr.entity_id (+)= feb.entity_id
    AND     (rel.start_date IS NULL OR rel.start_date <= nvl(:3, rel.start_date))
    AND     (rel.end_date IS NULL OR rel.end_date >= nvl(:4, rel.end_date))
    ORDER BY     decode(     operassoc.parent_entity_id,
                   '', decode(     entity_type_code,
                             'O', 2,
                             'C', 3,
                             'E', 4,
                             999),
                   1),
              entity_name) QRSLT WHERE PARENT_ENTITY_ID = :6
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2845)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1835)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:533)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:421)
         at OA.jspService(_OA.java:212)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:610)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:359)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:797)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01722: invalid number
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:966)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1062)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:857)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4511)
         at oracle.apps.gcs.setup.hierarchy.server.EntitiesVOImpl.executeQueryForCollection(EntitiesVOImpl.java:106)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
         at oracle.jbo.server.ViewRowSetImpl.activateRowSetState(ViewRowSetImpl.java:4925)
         at oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3792)
         at oracle.jbo.server.ViewRowSetImpl.activateIteratorState(ViewRowSetImpl.java:4960)
         at oracle.jbo.server.OAJboViewObjectImpl.activateInternalRowSets(Unknown Source)
         at oracle.jbo.server.OAJboApplicationModuleImpl.activateState(Unknown Source)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.activateState(OAApplicationModuleImpl.java:3066)
         at oracle.jbo.server.ApplicationModuleImpl.doActivateState(ApplicationModuleImpl.java:7053)
         at oracle.jbo.server.ApplicationModuleImpl.doActivateAMState(ApplicationModuleImpl.java:6961)
         at oracle.jbo.server.Serializer.activate(Serializer.java:274)
         at oracle.jbo.server.DBSerializer.activateRootAM(DBSerializer.java:330)
         at oracle.jbo.server.ApplicationModuleImpl.activateFromStack(ApplicationModuleImpl.java:5768)
         at oracle.jbo.server.ApplicationModuleImpl.activateState(ApplicationModuleImpl.java:5628)
         at oracle.jbo.server.ApplicationModuleImpl.activateStateForUndo(ApplicationModuleImpl.java:7697)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.activateStateForUndo(OAApplicationModuleImpl.java:2159)
         at oracle.apps.gcs.setup.hierarchy.server.HierarchyAMImpl.activateStateForUndo(HierarchyAMImpl.java:10364)
         at oracle.apps.gcs.setup.hierarchy.webui.HierUploadCO.processFormRequest(HierUploadCO.java:89)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:815)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1189)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2841)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1835)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:533)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:421)
         at OA.jspService(_OA.java:212)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:610)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:359)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:797)
    java.sql.SQLException: ORA-01722: invalid number
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:966)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1062)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:857)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4511)
         at oracle.apps.gcs.setup.hierarchy.server.EntitiesVOImpl.executeQueryForCollection(EntitiesVOImpl.java:106)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
         at oracle.jbo.server.ViewRowSetImpl.activateRowSetState(ViewRowSetImpl.java:4925)
         at oracle.jbo.server.ViewRowSetIteratorImpl.activateIteratorState(ViewRowSetIteratorImpl.java:3792)
         at oracle.jbo.server.ViewRowSetImpl.activateIteratorState(ViewRowSetImpl.java:4960)
         at oracle.jbo.server.OAJboViewObjectImpl.activateInternalRowSets(Unknown Source)
         at oracle.jbo.server.OAJboApplicationModuleImpl.activateState(Unknown Source)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.activateState(OAApplicationModuleImpl.java:3066)
         at oracle.jbo.server.ApplicationModuleImpl.doActivateState(ApplicationModuleImpl.java:7053)
         at oracle.jbo.server.ApplicationModuleImpl.doActivateAMState(ApplicationModuleImpl.java:6961)
         at oracle.jbo.server.Serializer.activate(Serializer.java:274)
         at oracle.jbo.server.DBSerializer.activateRootAM(DBSerializer.java:330)
         at oracle.jbo.server.ApplicationModuleImpl.activateFromStack(ApplicationModuleImpl.java:5768)
         at oracle.jbo.server.ApplicationModuleImpl.activateState(ApplicationModuleImpl.java:5628)
         at oracle.jbo.server.ApplicationModuleImpl.activateStateForUndo(ApplicationModuleImpl.java:7697)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.activateStateForUndo(OAApplicationModuleImpl.java:2159)
         at oracle.apps.gcs.setup.hierarchy.server.HierarchyAMImpl.activateStateForUndo(HierarchyAMImpl.java:10364)
         at oracle.apps.gcs.setup.hierarchy.webui.HierUploadCO.processFormRequest(HierUploadCO.java:89)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:815)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1189)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2841)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1835)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:533)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:421)
         at OA.jspService(_OA.java:212)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:610)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:359)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:797)

  • SQL Error 207 when using Query Designer

    Hi experts I hope you can help me out with this it is urgent!
    I am crating a Query on the query designer NW04s, when I add a column from my info provider I get the following error:
    CX_SQL_EXCEPTION Occurred (program: cl_sql_statement========cp etc.
    I check the WP log and I found this:
    C Wed Jan 31 10:22:59 2007
    C  sloledb.cpp [ParamStmtExec,line 12768]: Error/Message: (err 207, sev 16), Invalid column name 'TXTMD'.
    C  Procname: [##Y4CWP_JFR_wpf00000074440000296924022803]
    C  sloledb.cpp [ParamStmtExec,line 12768]: Error/Message: (err 207, sev 16), Invalid column name 'TXTSH'.
    C  Procname: [##Y4CWP_JFR_wpf00000074440000296924022803]
    C  sloledb.cpp [ParamStmtExec,line 12768]: Error/Message: (err 207, sev 16), Invalid column name 'LANGU'.
    C  Procname: [##Y4CWP_JFR_wpf00000074440000296924022803]
    C  sloledb.cpp [ParamStmtExec,line 12768]: Error/Message: (err 207, sev 16), Invalid column name 'CURRENCY'.
    C  Procname: [##Y4CWP_JFR_wpf00000074440000296924022803]
    C  ParamStmtExec failed.  HR 80040e14 DBSL retcode 100. stmt: [select [S00].[CURRENCY]  AS [0000000023] , [T00].[TXTSH]  AS [0000000
    C  /* R3:CL_SQL_STATEMENT==============CP:399 T:/BI0/SCURRENCY */
    C  ]
    C  Conn_i:1 selection:1 singleton:0 flag_fupd:0 use_cursor:0 chksum: 1122000
    C  dbdsmss: DBSL100 SQL207
    C  Invalid column name 'CURRENCY'.Invalid column name 'LANGU'.Invalid column name 'TXTSH'.Invalid column name 'TXTMD'.
    B  ***LOG BY2=> sql error 207        performing OPC        [dbds#1 @ 482] [dbds    0482 ]
    B  ***LOG BY0=> Invalid column name 'CURRENCY'.Invalid column name 'LANGU'.Invalid column name 'TXTSH'.Invalid column name 'TXTMD'.
    B  ***LOG BY1=> sql error 207        [dbacds#2 @ 1422] [dbacds  1422 ]
    C  sloledb.cpp [ParamStmtExec,line 12768]: Error/Message: (err 207, sev 16), Invalid column name 'TXTMD'.
    C  Procname: [##Y4CWP_JFR_wpf00000074440000296940022803]
    C  sloledb.cpp [ParamStmtExec,line 12768]: Error/Message: (err 207, sev 16), Invalid column name 'LANGU'.
    C  Procname: [##Y4CWP_JFR_wpf00000074440000296940022803]
    C  sloledb.cpp [ParamStmtExec,line 12768]: Error/Message: (err 207, sev 16), Invalid column name 'UNIT'.
    C  Procname: [##Y4CWP_JFR_wpf00000074440000296940022803]
    C  ParamStmtExec failed.  HR 80040e14 DBSL retcode 100. stmt: [select [S00].[UNIT]  AS [0000000008] , [T00].[TXTMD]  AS [0000000008_
    C  /* R3:CL_SQL_STATEMENT==============CP:399 T:/BI0/SUNIT */
    C  ]
    Dont know what is going on,
    Regards,
    Alejandro.

    Hi Its quite difficult to analyze,however are you on latest FEP SP 11??
    if not try downloading from
    service.sap.com/swdc>Download>support packages and patches>Ebtry by application component>Support Packages and Patches" SAP Frontend Components" SAP GUI FOR WINDOWS" SAP GUI FOR WINDOWS 6.40-->Win 32
    for 3.x front end bw350_11-10001615.exe
    for Nw2004s front end - Bw700SP11_1100-10001615.exe
    Hope it Helps
    Chetan
    @CP..

  • SQL Report query ORA-06502: PL/SQL: numeric or value error: character strin

    Hello,
    I have saved below query in the sql scripts, which executes good under SQL Developer,
    select     "RVV"."RLNUM" as "RLNUM",
         "GVREB"."RLNUM" as "RLNUM",
         "TVV"."RLNUM" as "RLNUM_1",
         "Regulation"."CODE" as "CODE",
         "Regulation"."NAAM" as "NAAM",
         "GVREB"."BRONCODE" as "BRONCODE",
         sum(RVV.RVV_MODULATIE) as "RVV_MODULATIE",
         sum(RVV.RVV_EXTRA_MODUL) as "RVV_EXTRA_MODUL",
         sum(GVREB.PMB) as "PMB",
         sum(GVREB.VVM) as "VVM",
         sum(GVREB.VVEM) as "VVEM",
         "GVREB"."STATUS" as "STATUS",
         sum(TVV.VVM) as "VVM",
         sum(TVV.VVEM) as "VVEM",
         "Regulation"."version" as "version",
         "TVV"."Appyear" as "Appyear"
    from     "GVREB" "GVREB",
         "RVV" "RVV",
         "TVV" "TVV",
         "Regulation" "Regulation"
    where      "RVV"."RLNUM" = :P17_Relationnum
    and     "GVREB"."RLNUM" = "RVV"."RLNUM"
    and     "TVV"."RLNUM" = "GVREB"."RLNUM"
    and     "GVREB"."CODE" = "TVV"."RegulationSCODE"
    and     "Regulation"."CODE" = "GVREB"."CODE"
    and     "GVREB"."STATUS" = 'VWT'
    and     "TVV"."Appyear" = 2009
    group by RVV.RLNUM, GVREB.RLNUM, TVV.RLNUM, Regulation.CODE, Regulation.NAAM, GVREB.BRONCODE, GVREB.STATUS, Regulation.version, TVV.Appyear
    order by Regulation.version ASC
    however when tried to put in the region -> query builder it gives below error,
    italics ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Return to application.+italics+
    Kindly suggest me work around this error.
    Cheers,
    G1R15|-|
    Edited by: G on Jul 11, 2010 10:03 PM

    Hi,
    I was able to resolve the issue. I changed it to = To_Number while assigning.
    and for other issue, earlier I choose "Select List" for drop down. I changed this to "Select list with Submit". for the issue of "depending on this values in the report should get change"
    Thanks for your support,
    Girish

  • PL/SQL function body returning SQL query - ORA-06502: PL/SQL: numeric or value error

    I'm attempting to dynamically generate a rather large SQL query via the "PL/SQL function body returning SQL query" report region option.  The SQL query generated will possibly be over 32K.  When I execute my page, I sometimes receive the "ORA-06502: PL/SQL: numeric or value error" which points to a larger than 32K query that was generated.  I've seen other posts in the forum related to this dynamic SQL size limitation issue, but they are older (pre-2010) and point to the 32K limit of the DNS (EXECUTE IMMEDIATE) and DBMS_SQL.  I found this post (dynamic sql enhancements in 11g) which discusses 11g no longer having the 32K size limitation for generating dynamic SQL.  Our environment is on 11gR2 and using ApEx 4.2.1.  I do not know which dynamic SQL method -- DNS or DBMS_SQL -- ApEx 4.2.1 is using.  Can someone clarify for me which dynamic SQL method ApEx uses to implement the "PL/SQL function body returning SQL query" option?
    As a test, I created a page on apex.oracle.com with a report region with the following source:
    declare
      l_stub varchar2(25) := 'select * from sys.dual ';
      l_sql  clob := l_stub || 'union all ';
      br     number(3) := 33;
    begin
      while length ( l_sql ) < 34000 loop
        l_sql := l_sql || l_stub || 'union all ';
      end loop;
      l_sql := l_sql || l_stub;
      for i in 1 .. ceil ( length ( l_sql ) / br ) loop
        dbms_output.put_line ( dbms_lob.substr ( l_sql, br, ( ( i - 1 ) * br ) + 1 ) );
      end loop;
      return l_sql;
    end;
    The dbms_output section is there to be able to run this code in SQL*Plus and confirm the size of the SQL is indeed larger than 32K.  When running this in SQL*Plus, the procedure is successful and produces a proper SQL statement which can be executed.  When I put this into the report region on apex.oracle.com, I get the ORA-06502 error.
    I can certainly implement a work-around for my issue by creating a 'Before Header' process on the page which populates an ApEx collection with the data I am returning and then the report can simply select from the collection, but according to documentation, the above 32K limitation should be resolved in 11g.  Thoughts?
    Shane.

    What setting do you use in your report properties - especially in Type and in Region Source?
    If you have Type="SQL Query", then you should have a SELECT statement in the Region Source. Something like: SELECT .... FROM ... WHERE
    According to the ERR-1101 error message, you have probably set Type to "SQL Query (PL/SQL function body returning SQL query)". In this situation APEX expects you to write a body of a PL/SQL function, that will generate the text of a SQL query that APEX should run. So it can be something like:
    declare
    mycond varchar2(4000);
    begin
    if :P1_REPORT_SEARCH is not null THEN
    mycond:='WHERE LAST_NAME like :P1_REPORT_SEARCH ||''%''';
    end if;
    return 'select EMPLOYEE_ID, FIRST_NAME, LAST_NAME from EMPLOYEES ' ||mycond;
    end;
    And for escaping - are you interested in escaping the LIKE wildcards, or the quotes?
    For escaping the wildcards in LIKE function so that when the user enters % you will find a record with % and not all functions, look into the SQL Reference:
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions007.htm
    (You would than need to change the code of your function accordingly).
    If you are interested in escaping the quotes, try to avoid concatenating the values entered by the user into the SQL. If you can, use bind variables instead - as I have in my example above. If you start concatenating the values into the text of SQL, you are open to SQLInjection - user can enter anything, even things that will break your SQL. If you really need to allow users to choose the operator, I would probably give them a separate combo for operators and a textfield for values, than you could check if the operator is one of the allowed ones and create the condition accordingly - and than still use bind variable for inserting the filtering value into the query.

  • SQL 2012 SP1 - How to determine a query that causes Error 8623 in SQL Log: The query processor ran out of internal resources and could not produce a query plan. This is a rare event...

    We are getting multiple 8623 Errors in SQL Log while running Vendor's software.
    How can you catch which Query causes the error?
    I tried to catch it using SQL Profiler Trace but it doesn't show which Query/Sp is the one causing an error. 
    I also tried to use Extended Event session to catch it, but it doesn't create any output either.
    Error:
    The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that
    reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
    Extended Event Session that I used;
    CREATE EVENT SESSION
        overly_complex_queries
    ON SERVER
    ADD EVENT sqlserver.error_reported
        ACTION (sqlserver.sql_text, sqlserver.tsql_stack, sqlserver.database_id, sqlserver.username)
        WHERE ([severity] = 16
    AND [error_number] = 8623)
    ADD TARGET package0.asynchronous_file_target
    (SET filename = 'E:\SQLServer2012\MSSQL11.MSSQLSERVER\MSSQL\Log\XE\overly_complex_queries.xel' ,
        metadatafile = 'E:\SQLServer2012\MSSQL11.MSSQLSERVER\MSSQL\Log\XE\overly_complex_queries.xem',
        max_file_size = 10,
        max_rollover_files = 5)
    WITH (MAX_DISPATCH_LATENCY = 5SECONDS)
    GO
    -- Start the session
    ALTER EVENT SESSION overly_complex_queries
        ON SERVER STATE = START
    GO
    It creates only .xel file, but not .xem
    Any help/advice is greatly appreciated

    Hi VK_DBA,
    According to your error message, about which query statement may fail with error message 8623, as other post, you can use trace flag 4102 & 4118 for overcoming this error. Another way is looking for queries with very long IN lists, a large number of
    UNIONs, or a large number of nested sub-queries. These are the most common causes of this particular error message.
    The error 8623 occurs when attempting to select records through a query with a large number of entries in the "IN" clause (> 10,000). For avoiding this error, I suggest that you could apply the latest Cumulative Updates media for SQL Server 2012 Service
    Pack 1, then simplify the query. You may try divide and conquer approach to get part of the query working (as temp table) and then add extra joins / conditions. Or You could try to run the query using the hint option (force order), option (hash join), option
    (merge join) with a plan guide.
    For more information about error 8623, you can review the following article.
    http://blogs.technet.com/b/mdegre/archive/2012/03/13/8623-the-query-processor-ran-out-of-internal-resources-and-could-not-produce-a-query-plan.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Error in Query Execution : SQL Error: 1110

    Dear Experts,
         We did the system copy from production to Sandbox system. Executing one query got terminated with the following error.
         Error SQL Error: 1110
         Abort System error in program SAPLRRK0 and form RSRDR;SRRK0F30-01-
         I copy this query to the new one and remove all the filter. It works!!!
         Any suggestion on this issue?
    Regards

    Hi,
    check these threads
    BEx query error
    BEx Query Error
    Regards
    harikrishna N

Maybe you are looking for