Query is executed although sub-query is error?

Hi everyone,
I have a problem want to explained.
My sub-query show an error if it's executed alone: "ORA-00904: invalid column name"
SELECT id FROM table_A WHERE field1 = 'exam' (field1 is not exist)
But when execute with:
SELECT * FROM table_B WHERE id IN (SELECT id FROM table_A WHERE field1 = 'exam')
it's ok, although we don't have any data filtered. I don't known the reason why? Can anyone explain this?
Thanks a lot!

I think you're looking at something like this...
SQL> select deptno from emp where dname = 'SALES';
select deptno from emp where dname = 'SALES'
ERROR at line 1:
ORA-00904: "DNAME": invalid identifier
SQL> select deptno from dept where deptno in (select deptno from emp where dname in 'SALES');
    DEPTNO
        30
SQL> select deptno from dept where deptno in (select deptno from emp where emp.dname in 'SALES');
select deptno from dept where deptno in (select deptno from emp where emp.dname in 'SALES')
ERROR at line 1:
ORA-00904: "EMP"."DNAME": invalid identifier
SQL> ed
Wrote file afiedt.buf
  1* select deptno from dept where deptno in (select deptno from emp where dept.dname in 'SALES')
SQL> /
    DEPTNO
        30In this example, "DNAME" doesn't exist in the emp table, but in the second query it seems to work. However what it's really doing is referencing the "DNAME" column of the outer query. This is proved in the third and fourth query by prefixing the DNAME column with the EMP and DEPT table names to explicitly say where we are expecting the column to come from.

Similar Messages

  • InfoSet Query: Syntax Error while generating the program.

    Dear All,
    I have a Query in CRM system which contains an Infoset based on LDB.
    The InfoSet Query throws up a Syntax error while generating the program.
    So, we are not able to change the Infoset using the Infoset Query through SQ01.
    The error is as follows:-
    Syntax error in program "AQZZ==/SAPQUERY/CRM_ACTMON1 ".
    Error in the ABAP Application Program
    The current ABAP program "CL_QUERY_OUTPUT_DEFINITION====CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program "AQZZ==/SAPQUERY/CRM_ACTMON1 "
    in include "AQZZ==/SAPQUERY/CRM_ACTMON1 " in
    line 28:
    ""CRMT_REPORT_LOCATORLIST" must be a flat structure. You cannot use int"
    "ernal tables, strings, references, or structures as components. -"
    Please help me arrive at an solution, so that we are able to change the Infoset through the InfoSet Query.
    Awaiting your reply as soon as possible.
    Thanks and Regards,
    Pankaj.

    There is an error in your query, specifically in the definition of CRMT_REPORT_LOCATORLIST. In the short dump (transaction ST22) you will see more details and the exact location of an error if you just scroll down.
    I can't tell more because this problem is specific to your system, to which I have no access. Read the whole dump and look at all the objects mentioned there.

  • Query running error

    Hi, all.
    In our PROD system we faced one problem. When we run query we get error
    "Cannot create characteristic combination: type \BI0\0100000100" doesn't exit"
    "Special situation CX_SY_CREATE_DATE_ERROR"
    I think we have problem with temporary database objects what is described in SAP note 1139396. And we execute report "SAP_DROP_TMPTABLES", but it doesn't help.
    Can anybody help us with this problem?
    wbr, Fanil. 

    This probably won't solve your issue... but have you tried to regenerate your query using RSRT -> Generate button?  I've found that this feature has helped resolved some query execution errors after transporting.
    Can you give us any information about what dates are used in your query (standard or custom, any variables created on these date InfoObjects?).  Thanks!

  • MDX Query Syntax error

    I have a simple MDX query is shown in below:
    SELECT [Accounts].[pv] ON ROWS,
    [Reporting].Members ON COLUMNS
    FROM RoggeBSO.Db
    (please note that Accounts, pv and Reporting words are in square brackets)
    When I execute this query on the MDX Script Editor (in EAS), I get the following syntax error:
    Statement Executed with warnings.
    Syntax error in input MDX Query on line 1 at token 'ON'
    Unexpected Essbase error 1260052
    I tried this on both ASO & BSO cubes but didn't work. Could anyone help please?
    Regards
    Chandra
    Edited by: user2695091 on 22-Apr-2009 03:27

    SELECT {[Accounts].[pv]} ON ROWS,
    {[Reporting].Members} ON COLUMNS
    FROM RoggeBSO.Db

  • Query Engine Error in Visual Studio 2005

    Post Author: Chris K
    CA Forum: Crystal Reports
    I created a report in Crystal 11 and have included it in a project created in Visual Studio 2005.  When I try to run the report in VS I get the message: "Query Engine Error: 'Error Code: 0x' Failed to open a rowset.  Error in File"  I can run the report in Crystal without any errors.  The report has subreports and parametes.  I am using a stored procedure in SQL 2005.  I have included may other reports in this project and not had any problems.  Any suggestions?

    Post Author: gandasi
    CA Forum: Crystal Reports
    I had an issue that sounds very similar - report worked beautifully in Crystal, but "failed to return rowset" when run from my application (which is not VS2005, but in my case that didn't matter).
    Turns out that I had not given execute rights to the stored procedure to the public group in SQL server. I guess when running the report in Crystal it was using my Windows Authentication to logon or something which was why that was running OK.
    I explicitly set the permissions on the stored proc to grant public execute, and the report would run from my app.
    Hope this helps
    Cheers

  • Query Compilation Error - Function overloaded

    I'm trying to use 2 document style web services in a query. When I test the query
    I get:
    tart server side stack trace:
    java.rmi.RemoteException: EJB Exception:; nested exception is:
         java.rmi.RemoteException: Query Compilation Error (Type Checks) 1-3-1-3: Function
    Employees1:ProcessDocument() is overloaded.
    java.rmi.RemoteException: Query Compilation Error (Type Checks) 1-3-1-3: Function
    Employees1:ProcessDocument() is overloaded.
         at com.bea.ldi.server.QueryBean.execute(Unknown Source)
         at com.bea.ldi.server.QueryBean_1ao78o_EOImpl.execute(QueryBean_1ao78o_EOImpl.java:306)
         at com.bea.ldi.server.QueryBean_1ao78o_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:821)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    End server side stack trace
    Can someone tell me what this error means?
    Thank you,
    Jason

    Release Note Entry:
    When designing Workshop web services, you may need to alter the
    Targetnamespace for a web service if a method name in this web service
    clashes with a method name in another web service that uses the same
    Targetnamespace.
    "Mike Reiche" <[email protected]> wrote:
    >
    "A function with the same name has multiple definitions in the configuration.
    Check
    you configuration"
    Check for multiple definitions of Employees1:ProcessDocument() in your
    CFLD file(s).
    - Mike
    "Jason Levine" <[email protected]> wrote:
    I'm trying to use 2 document style web services in a query. When I test
    the query
    I get:
    tart server side stack trace:
    java.rmi.RemoteException: EJB Exception:; nested exception is:
         java.rmi.RemoteException: Query Compilation Error (Type Checks) 1-3-1-3:
    Function
    Employees1:ProcessDocument() is overloaded.
    java.rmi.RemoteException: Query Compilation Error (Type Checks) 1-3-1-3:
    Function
    Employees1:ProcessDocument() is overloaded.
         at com.bea.ldi.server.QueryBean.execute(Unknown Source)
         at com.bea.ldi.server.QueryBean_1ao78o_EOImpl.execute(QueryBean_1ao78o_EOImpl.java:306)
         at com.bea.ldi.server.QueryBean_1ao78o_EOImpl_WLSkel.invoke(Unknown
    Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:821)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    End server side stack trace
    Can someone tell me what this error means?
    Thank you,
    Jason

  • Highlight SQL query at error

    A feature I've come to rely on in Toad is that when I run a query and there is an error, the part of the code that caused the error will be highlighted. It's simple, and it's a big productivity boost. This feature is what's stopping me from using SQL Developer at this point. Are there plans to implement this?

    I second this comment!
    I do a lot of OWB development and I often validate results of the mapping directly in SQL (which are usually going on for 200-400 lines.
    In toad, executing the statement wit an error (usually a constant defined in OWB but represented in the intermediaet result by a "FULLPACKAGE.BlaBlaBla will bring the cursor directly at the line that errored. SQL Developer will only give an error message. Kinda counter productive...

  • Unknown Query Engine Error

    Post Author: Scott Miers
    CA Forum: Data Connectivity and SQL
    Hello,
    I have an application written in vb6 that opens a crystal 11 report.
    The report retrieves data from Microsoft SQL Server 2005.
    Occasionally, I get this error when opening large reports:
    "Unknown Query Engine Error"
    The error also occurred on Microsoft SQL Server 2000 and Crystal 8.5
    I only receive this error message on windows XP. This error does not occur on Windows 2000 workstation or server.
    I can easily reproduce the problem.
    Any Suggestions?
    Regards,
    Scott

    Post Author: sharonmtowler
    CA Forum: Data Connectivity and SQL
    im not sure if you are asking a question, do you place the parameters in the sub report as well as the main?

  • See my query and error, see my query and error

    hi master
    sir i use inner query but not run
    please see my query with error
    query :==========
    select accid as acccode,fstatus, case when fstatus=1 then
    (select sum(drbal) from accbal where substr(accbal.accid,1,length(acccode))=acccode)
    end what
    from chartofacc
    error :========
    SQL> /
    (select sum(drbal) from accbal where substr(accbal.accid,1,length(acccode))=acccode)
    ERROR at line 2:
    ORA-00904: "ACCCODE": invalid identifier
    please sir give me any idea *

    Does this column ACCCODE exist in your table accbal?
    The columns in the outer query will not be visible in the inner query but the vise versa is true.

  • Save Query - An error occurred while creating connection strings for the query

    A workbook trying to edit and reload I get the following error "Save Query - An error occurred while creating connection strings for the query" No Power Pivot data model or anything.

    I am getting the same error when editing a Power Query in an Excel spreadsheet. It happens when I change a Group By step to do a Sum instead of Count Rows.

  • Query Engine Error when adding to repository.

    I'm using Crystal 9.  I am trying to using the Add Command function as a datasource from an ODBC connection.  The SQL is straightforward.
    Select dbo.CDS_STATDAY.Meta_ID
    From dbo.CDS_STATDAY
    I get an error when I select the "Add to Repository" checkbox in the "Add Command to Report" dialog box.  I don't get an error if I don't select it and the query seems to run fine.
    The errors I get are 'Query Engine Error:"' and then 'Not supported.  Details: Failed to create object.'
    Is this a permissions problem?

    Hi Mark,
    Do you have  Business Objects / Crystal Enterprise in stalled in your network? If so, what is the version of Enterprise you are using ?  This is becuase, the Crystal Query enginene have changed from  CR server XI. 
    Thanks,
    Sastry

  • Query Engine Error in Crystal Report

    I have a asp application with crystal report as reporting tool. Every thing works fine with Oracle 9i, but when i migrate to Oracle Database 10g Release2 some of the reports in crystal report shows following error report.
    Query Engine Error:'HY00:[oracle][ODBC][ora]ora-01456:may not perform insert/delete/update operation inside a Read Only transaction.
    ORA-06521:at "<dbusername>.<procedure name>,line 58
    ORA-06512:at line1
    I checked the database is in READ WRITE mode.
    any help wolud be appreciated.
    Thanks in Advance
    Debashis

    Hi,
    This is posted in the wrong forum. This forum is for Oracle Berkeley DB. Please find the correct forum and post your question there.
    Regards,
    Alex Gorrod,
    Oracle Berkeley DB

  • Query Engine Error:

    Post Author: swordfish8
    CA Forum: General
    Hi, Many thank for taking the time to read this thread, the web application work on development box but fails when deployed.
    Please help, the problem is detailed below, cheers, Praveen
    Developed Environment
    Web Application Developed in VS .NET 2002
    Crystal Reports 9.0
    Set Up Package :
    Project Output: Primary Output and Content Files selected
    Merge Modules:        Database_Access.msm
                                           Database_Access_enu.msm
                                 Managed.msm
                                 Regwiz.msm
                                 VC_CRT.msm
                                 VC_STL.msm
    Code:
    mycommand.CommandText = "ASR_STATISTICS"
    mycommand.CommandType = CommandType.StoredProcedure
    With mycommand.Parameters
    .Add(New SqlParameter("@WeekStartDate", SqlDbType.DateTime)).Value =    _CDate(Me.txtDate.Text.Trim)
    .Add(New SqlParameter("@WeekEndDate", SqlDbType.DateTime)).Value = _
      CDate(Me.txtEndDate.Text.Trim)
    .Add(New SqlParameter("@Customer", SqlDbType.VarChar)).Value = _
               (Me.lstCustomer.SelectedItem.Value.Trim)
    End With
    Dim myDA As New SqlClient.SqlDataAdapter()
    myDA.SelectCommand = mycommand
    Dim myds As New Dataset1()
    myDA.Fill(myds, "ASR_STATISTICS")
    Dim oRpt As New crptStatistics()
    oRpt.SetDataSource(myds)
    Me.CrystalReportViewer.ReportSource = oRpt
    Installed the web application on the server
    Operating System: Windows Server 2003
    ERROR
    Server Error in '/ASDReports' Application.
    Query Engine Error: 'C:\WINDOWS\TEMP\temp_dff30854-29f4-4c4e-8fe0-66dbea4cd19b.rpt'
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: CrystalDecisions.CrystalReports.Engine.DataSourceException: Query Engine Error: 'C:\WINDOWS\TEMP\temp_dff30854-29f4-4c4e-8fe0-66dbea4cd19b.rpt'Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
    &#91;DataSourceException: Query Engine Error: 'C:\WINDOWS\TEMP\temp_dff30854-29f4-4c4e-8fe0-66dbea4cd19b.rpt'&#93;
        . K(String 
    , EngineExceptionErrorID   ) +514
        . F(Int16   , Int32   ) +493
       CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext reqContext) +462
       CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext pageReqContext) +201
       CrystalDecisions.Web.ReportAgent.v(Boolean  `) +137
       CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e) +99
       System.Web.UI.Control.PreRenderRecursiveInternal() +77
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Control.PreRenderRecursiveInternal() +161
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832

    Post Author: Bandit07
    CA Forum: Upgrading and Licensing
    I would go through and add in each criteria 1 at a time to see which one is causing the error. 

  • Query Result Error

    Hi Experts,
    I am facing problem with Bex Queries in Dashboards..
    I am using Bex Queries in the Dashboard. When i go to Preview Mode i am getting an error "Query Result Error".
    In this dashboard i do have an Hierarchical Data.
    Please help me in solving this Problem..
    I am using Dashboard 4.1 SP3

    Hi Suman,
    Thanks for your quick reply...
    I am trying to just Preview data..
    I even checked the Bex Query its working fine. And i am not using any filters or prompts.
    I can even preview the data when i try to edit query in the Query Browser Tab in the Dashboard. But i don't know wts the problem i am unable to see the data in the SWF mode.

  • Query Engine Error after upgrade from CR for VS2003 to CR for VS2008

    Three CR reports were built in CR 8.5, loaded into VS2003 (C#), and converted. Each report worked fine for the past three years. Each report users the same odbc connection direct to the Sybase 12.5.3 database and each is based on a stored procedure. Each report has input parameters. Recently we did an upgrade to VS2008. We installed the CRRedist2008_x86.msi on the development machine running Windows XP and on the server running Windows 2003. No changes were made to the design of the reports, the parameters, or to the database stored procedures.
    Several other reports run just fine since the update to VS2008, however, two reports are now raising an error message "Query Engine Error: 'An internal error has occurred. Please contact Business Objects technical support.' Failed to open a  rowset." This error message occurs just after ReportViewer.ShowDialog() method is called (login has already been successfully achieved) I verified that with the parameters being passed to the reports are correct and that these should indeed be returning data.
    One additional report is also now raising the error "Query Engine Error at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetLastPageNumber(RequestContext pRequestContext) at CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext) ". It can be described as above, odbc connection to Sybase 12.5.3, achieves a successful login, based on a stored procedure that is unchanged. The rpt itself is unchanged.
    I would appreciate your assistance with getting these reports working again. Any suggestions welcome!

    I forgot to mention that I had already done a 'Verify Database' on each of these reports, with no success. However, I have now repeated the 'Verify Database' on each report and they all work. Not sure why it had to be done a second time, but I am very happy that it works. Thank you for your response.
    In answer to your question - why does the Crystal Reports runtime have to be installed on the development machine? This is because our process includes an installation of the application on the development machine, independent of the debug environment, and a test of that application instance before deploying to the application server.

Maybe you are looking for

  • Keep cardinality with lookup-operator?!

    Hi I am using a lookup operator to get values from a source table. The match criteria often results in multiple search results. (on purpose) What I want to do is, to take only the first searchresult of the lookup and put it in my destination table...

  • URGENT advice needed on labels/textfields please!!

    I have been trying for days to add labels and textFields to my applet and can only manage to display one. My assignment instructions suggest I use makeTextField method and call the setEditable method from the makeTextField method to avoid repetition

  • Need help, iTunes bugging

    When i try to play music on iTunes my music plays 2 or 3x faster than it should. Does anyone know how to fix this?

  • EDI/IDocs for WMS

    Hi all, I need sample code and processing steps for EDI-IDocs for WMS concept.

  • Read a file using java

    I have a file that is tooooo large which is 70,000 lines long I want to search for a specific line of the file. All I have with me is some part of the line of the file. For example : My each line has data in the following form. Information I have wit