Agreggate Expression Error

What could be wrong with the query below?
SELECT SUM(CASE WHEN (SELECT TOP 1 ISNULL(StartDate,'01-01-1900') FROM TestingTable ORDER BY StartDate Asc)<> '01-01-1900' THEN 1 ELSE 0 END) AS Testingvalue.
I get the error:
Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
Thank you
Zionlite

The problem is you are trying to aggregate the results of a subquery (nothing to do with the case at all).
The way around this, is to put your subquery into the query itself, like this:
DECLARE @TestingTable TABLE (startDate date)
INSERT INTO @TestingTable (startDate)
VALUES (NULL)
SELECT SUM(CASE WHEN COALESCE(startDate,'1900-01-01') = '1900-01-01' THEN 0 ELSE 1 END)
FROM (SELECT TOP 1 startDate AS startDate
FROM @TestingTable
ORDER BY startDate asc) a
--alternative
SELECT SUM(CASE WHEN COALESCE(startDate,'1900-01-01') = '1900-01-01' THEN 0 ELSE 1 END)
FROM (SELECT MIN(startDate) AS startDate
FROM @TestingTable) a

Similar Messages

  • Tecra M9 - PCI Express Error at start-up

    Hello Everybody ..
    I own a Toshiba Tecra M9 (PTM91E-04R03TEN)
    http://www.toshiba.ie/innovation/jsp/supportMyProduct.do?service=IE#tab0;
    On switching on,- Its Showing the Toshiba splach screen and then "PCI Express error." on a black screen
    I can't get beyond this Black Screen
    and I can't get into BIOS ??..
    One time it did manage to boot up fully, I left it running for a while as I save information from the HDD. but then the problem started again .
    I believe this is a problem with the nvidia GPU ( Fatigue cracking on the BGA )
    I have the Laptop stripted down .. and have purchased ArctiClean , Thermal Pad, & Arctic Silver for the "repair"
    Should I have somebody scan the hardware and to find the troublemaker ? ..OR.. should I just reflow the GPU .
    I'm technically minded .. but not a PC / Laptop technican :(..
    any Instruction on how to proceed would be greatfully received ..
    Should i just " bung it in the oven" and see how it goes ? :) :) .
    Regards,
    Peter

    Hi
    I found and read your other post regarding this issue and in my opinion the PCI Express error is related to an PCI device (i.e miniPCI module like WLan / Bluetooth, etc ) connected to the motherboard.
    Of course I cannot say for sure that this issue isnt related to a GPU malfunction.
    Usually such details can be provided only by an service engineer who checked the notebooks hardware.
    Generally I dont recommend to disassemble the notebook. Its very tricky to perform such procedure and of course there is always a risk of part damage doing such procedure without any instructions.

  • "ABAP Basics" Book - arithmetic expression error in the sample code

    Hi all,
    I have just started learning ABAP on mini SAP system (NW7.01) by following "ABAP Basics" book.
    This question might be a FAQ, but I have spent a few days searching a right answer without success.
    I appreciate if you could help me on this.
    On the page 162, there is a function module sample, which contains the line as following:
    e_amount = i_km * '0.3'.
    Here l_km (import) is type of i, and e_amount (export) is type of f.
    Though I do not think of any problem with this line, it throws an arithmetic expression error when executed directly for testing as well as when called from a program.
    When I tried a similar thing in a program, it was fine.
    However within a function module it throws this error.
    Thanks in advance.
    Terry

    Like I said before, I do not think any problem about the code itself.
    I suspect some environmental things?
    I should have mentioned SAP mini system NW7.01 is running on Vista Business?
    To be specifc, I receive this message:
    Arithmetic operations are only expected for operands that can be converted to numbers.
    (numeric operands). - (numeric operands). - - - -
    with the following function module:
    [code]
    FUNCTION ZPTB00_CALCULATE_TRAVEL_EXPENS.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_KM) TYPE REF TO  I
    *"  EXPORTING
    *"     VALUE(E_AMOUNT) TYPE REF TO  F
    *"  EXCEPTIONS
    *"      FAILED
    e_amount = i_km * '0.3'.
    IF sy-subrc <> 0.
      RAISE failed.
    ENDIF.
    ENDFUNCTION.
    [/code]

  • Getting "ORA-00979: not a GROUP BY expression" error in Inline query

    Hello all,
    The following query when run in SCOTT user gives "ORA-00979: not a GROUP BY expression" error.
    If I remove the TRUNC function from the outer query's group by clause, then it fetches
    (My actual query is something similar to the following query. I have given emp, dept tables for convenience's sake)
    select e.empno,e.ename, AVG(e.SAL), trunc(e.hiredate),
    (select sum(sal) from emp
    where hiredate = e.hiredate) salary
    from emp e
    group by e.DEPTNO,e.EMPNO,e.ENAME, trunc(e.hiredate)
    Pls suggest how this error can be avoided.
    Regards,
    Sam

    Why not this?
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>
    satyaki>select e.empno,
      2         e.ename,
      3         AVG(e.SAL),
      4         trunc(e.hiredate),
      5        (
      6           select sum(sal)
      7           from emp
      8           where hiredate = e.hiredate
      9        ) salary
    10  from emp e
    11  group by e.DEPTNO,
    12           e.EMPNO,
    13           e.ENAME,
    14           e.hiredate;
         EMPNO ENAME      AVG(E.SAL) TRUNC(E.H     SALARY
          7934 MILLER         1887.6 23-JAN-82     5583.6
          7698 Glen             1848 23-JAN-82     5583.6
          7788 SCOTT          598.95 19-APR-87     598.95
          7900 JAMES          1379.4 03-DEC-81    6650.16
          7521 WARD           226.88 22-FEB-81     226.88
          7599 BILLY            4500 10-JUN-09       4500
          2222 sp               1200 14-SEP-09       1200
          7902 FORD          5270.76 03-DEC-81    6650.16
          7566 Smith            1848 23-JAN-82     5583.6
          7654 MARTIN           1815 28-SEP-81       1815
          7839 KING             7260 17-NOV-81       7260
         EMPNO ENAME      AVG(E.SAL) TRUNC(E.H     SALARY
          7844 TURNER           2178 08-SEP-81       2178
          7876 ADAMS          159.72 23-MAY-87     159.72
    13 rows selected.
    Elapsed: 00:00:00.03
    satyaki>Regards.
    Satyaki De.

  • "Invalid Expression " Error with Refreshing variable

    Hi
    When ever i try to validata following query in Refreshing tab of a variable, I am getting invalid expression error
    select USER_NAME from SNP_SESSION where SESS_NO = <%=odiRef.getSession()%>
    if i use following Query
    select STEP_MESS
    from <%=snpRef.getObjectName("L","SNP_STEP_LOG","D")%>
    where SESS_NO = <%=snpRef.getSession("SESS_NO")%>
    and STEP_STATUS = 'E'
    Its giving invalid table
    Need your suggestions
    Thanks
    Baji

    Hi
    Thanks alot for your information .But when ever i click on "Refresh" button available in refrshing tab.I am able to see following error in operator
    Execution
    java.sql.SQLException: ORA-00900: invalid SQL statement
    Description
    BeanShell script error: Sourced file: inline evaluation of: ``out.print("select USER_NAME from SNP_SESSION where SESS_NO = ") ; out.print(odiR . . . '' : Error in method invocation: Method getSession() not found in class'com.sunopsis.dwg.snpreference.b' : at Line: 2 : in file: inline evaluation of: ``out.print("select USER_NAME from SNP_SESSION where SESS_NO = ") ; out.print(odiR . . . '' : odiRef .getSession ( )
    BSF info: Filter_Records at line: 0 column: columnNo
    out.print("select USER_NAME from SNP_SESSION where SESS_NO = ") ;
    out.print(odiRef.getSession()) ;
    out.print(" \n\n\n\n\n\n") ;
    ****** ORIGINAL TEXT ******
    select USER_NAME from SNP_SESSION where SESS_NO = <%=odiRef.getSession()%>
    Thanks
    Baji

  • ORA-00936:missing expression Error

    I have what I would think was a simple SQL for Excel; but for some reason I keep getting the ORA-00936 missing expression error message.
    The SELECT AND FROM of the SQL are no problem. It's the Where portion of the SQL statement where it messes up. I have many user input required parameters. But I tested out the same SQL statement in Toad for Oracle and it worked fine.
    I'm wondering at this point if it's just too much for Excel.
    Here's the code from the "Where" portion of the SQL that worked in Toad for Oracle. I believe I have to change some of the syntax to get it to work in Excel; and I'm wondering if anyone knows the true correct way to do this. Because I'm also wondering if that's where I'm going wrong.
    Anyway, here's the code:
    WHERE (    (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= :date1
                 AND a_compl_summary.entry_date <= :date2
            AND (   a_compl_summary.product_family LIKE :pf1
                 OR a_compl_summary.product_family LIKE :pf2
                 OR a_compl_summary.product_family LIKE :pf3
                 OR a_compl_summary.product_family LIKE :pf4
                 OR a_compl_summary.product_family LIKE :pf5
            AND (a_compl_summary.region = :r1)
            AND (   a_compl_summary.NAME = :c1
                 OR a_compl_summary.NAME = :c2
                 OR a_compl_summary.NAME = :c3
                 OR a_compl_summary.NAME = :c4
                 OR a_compl_summary.NAME = :c5
            AND (a_compl_summary.complaint = :yorn)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl1
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl2
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl3
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl4
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl5
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
                                                                              :dc1
            AND (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
           )

    But are the ":parameter1" okay, or do I need to change the syntax for Excel?
    Because when I change the[b] :parameter to just a ? it ends up working to a degree. When I have too many parameters Excel ends up bailing on me with a Debug, Send Error Report box popping up.

  • ORA-00936 Missing expression - error in composite statement

    I'm using the following statement to call a function which uses a number retrieved from a table i.e.
    SELECT GETNEXTBUSINESSDATE(TO_DATE('28/08/2003','dd/mm/yyyy'), TO_NUMBER(SELECT VALUE1 FROM PARAMETERS WHERE PARCODE = 'CCR1' AND ATTRIBUTE1 = 'CCRNRQST1')) FROM DUAL;
    The function adds the value store in the value1 field to a date to get the next buisness date. The above statement is giving me an ORA-00936 Missing expression error message.
    Can anybody help ?

    We can't pass a query as a parameter.
    You'll have to write a function that accepts PARCODE and ATTRIBUTE1 as parameters, or figure some other way of getting the value.
    As I typed that, it occurred to me that this might work:
    SELECT GETNEXTBUSINESSDATE(TO_DATE('28/08/2003','dd/mm/yyyy')
          , x.val1)
    FROM ( SELECT TO_NUMBER(VALUE1) as val1
           FROM   PARAMETERS
           WHERE PARCODE = 'CCR1'
           AND ATTRIBUTE1 = 'CCRNRQST1') x;I'm not guaranteeing anything as I've never tried running a function from an in-line view.
    Cheers, APC

  • Expression Error (#:-1074001424) with Keithley 2000 DMM

    I wrote a program to that uses the Keithley DMM to check voltages on multiple channels, wait a period of time, and then check again. This cycle continues for the time specified.  I made this program on one laptop and it worked fine.  When I moved it over to a different laptop and a different Keithley DMM, then I started to see this issue.
    After stepping thru the program, It seems that the error comes from the "Configure Scan.vi".  The exact error message is:
    <ERR> ke2000 Error Query;
    instrument reports:
    -260,"Expression error"
    and the error code is: -1074001424.
    I searched for these myself and couldnt find anything helpful.  i changed a few things around and it seems that the "scan mode" parameter seems to be the problem.  It needs to be set to "internal" to read the channels on the additional scan card, but the program will return an error if it is not set to "none"... and when its set to "none" nothing happens.
    Please help me out! Thanks

    Nvm.... fixed it.  For the Configure Scan.vi, in some cases, one of the parameters, "Stop Channel", would be set to 1, when the starting channel was, by default, set to 1. Apparently this caused a conflict of some kind but I changed my program around so this doesnt happen anymore.

  • Missing Expression error in query...

    Hi,
    SELECT DECODE(NAME, '~', '', NAME),
           DECODE(NAME_2, '~', '', NAME_2),
           DECODE(SALES_ORG_ID, '~', '', SALES_ORG_ID),
           DECODE(PARTNER_ID, '~', '', PARTNER_ID)
    FROM DMN_SALES_PARTNER
    WHERE (
                        (upper(trim(country_name)),(trim(state_id))) IN
                       SELECT DISTINCT upper(trim(scsm.country_name)),upper(trim  (scsm.state_name))
               FROM sop_region_country_map srsm, sop_user_map   smap,sop_country_state_map scsm
               WHERE SSO_ID = '&sso_id' AND
               upper(trim(smap.region_id)) = upper(trim(srsm.region_id)) AND
               upper(trim(srsm.country_name)) = upper(trim(scsm.country_name)) AND
               decode(upper(trim(srsm.state_name)),NULL,'~',upper(trim(srsm.state_name)) ) = upper(trim(scsm.state_name))
               AND deviation_from_sap = 'N'
              OR
               SELECT upper(trim(scsm.country_name)),upper(trim(scsm.state_name))
               FROM sop_country_state_map scsm
               WHERE (upper(trim(scsm.country_name)),scsm.sap_state_map_id) in (
               select upper(trim(scssm.country_name)),scssm.sap_state_map_id
               from sop_country_state_sap_mapping scssm )
              )I want to return the combination of country_name and state_name from any of the queries in OR clause so as to compare them with the country_name and state_id of main query..I have written the above query for it but its giving me "Missing Expression" error..
    Pls help..
    Thx
    JP

    JP,
    Your second part after the "OR" is just a SQL statement and it is not being compared to an expression. That's probably what the error message is telling you.
    Regards,
    Rob.

  • Illegal start of expression error

    Hi, I keep getting an illegal start of expression error at the first parentheses of the main method, and I can't find the reason why. Any hints?
    import java.util.*;
    import java.io.*;
    import java.text.*;
    public class driver
        public static void main(String[] args)
              private String numerator, denominator;
              private Scanner inScan = new Scanner(System.in);
              System.out.print("Enter a numerator: ");
              numerator = inScan.nextLine(); //get numerator
              System.out.print("Enter a denominator: ");
              denominator = inScan.nextLine(); //get denominator
              EgyptianFraction fraction = new EgyptianFraction(numerator,denominator);
    }

    String numerator, numerator;
    Scanner inScan = new Scanner(System.in);Variables numerator, numerator and inScan are local variable, so there is no private modifer.
    Suggestion: name your class Driver. There is a widely held coding convention that classes should start with a capital letter.

  • ORAMED-01101 :[Filter Expression Error]Error evaluating filter expression.

    I am a newbie with oracle soa suite 11g. I am trying to use file adapter to upload the csv file contents to database.
    My csv file looks like:
    employeeid,employeename,designation,managerempid
    1121,abc,mts,211
    1122,def,mts,232
    1123,xyz,abc,133
    The generated xml file during the xsd test is
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <Root-Element xmlns="http://TargetNamespace.com/EmpAdaptor">
    <emp>
    <employeeid>1121</employeeid>
    <employeename>suneetha</employeename>
    <designation>mts</designation>
    <managerempid>211</managerempid>
    </emp>
    <emp>
    <employeeid>1122</employeeid>
    <employeename>challa</employeename>
    <designation>mts</designation>
    <managerempid>232</managerempid>
    </emp>
    <emp>
    <employeeid>1123</employeeid>
    <employeename>xyz</employeename>
    <designation>abc</designation>
    <managerempid>133</managerempid>
    </emp>
    </Root-Element>
    and in the mediator, I have the filter expression as shown:
    $in.body/ns1:EmpDetails/ns1:Emp
    the d/b table i created is
    CREATE TABLE empdtls (EMPID NUMBER(5) PRIMARY KEY,ENAME VARCHAR2(15) NOT NULL,DESIG VARCHAR2(10),MGREMPID NUMBER(5));
    When I deployed it, the application throws the below fault
    Non Recoverable System Fault :
    ORAMED-01101:[Filter Expression Error]Error evaluating filter expression.Possible Fix:Please make sure filter expression is valid, otherwise contact oracle for support. Cause:ORAMED-01102:[Filter Expression Metadata Error]Error evaluating filter expression, "$in.body/ns1:EmpDetails/ns1:Emp"Possible Fix:Please make sure filter expression metadata is valid, otherwise contact oracle for support.
    I have been trying to fix this error for almost three days..
    Somebody please help me..

    Sorry the generated xml during test is
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <EmpDetails xmlns="http://TargetNamespace.com/ServiceName">
    <Emp>
    <employeeid>1121</employeeid>
    <employeename>suneetha</employeename>
    <designation>mts</designation>
    <managerempid>211</managerempid>
    </Emp>
    <Emp>
    <employeeid>1122</employeeid>
    <employeename>challa</employeename>
    <designation>mts</designation>
    <managerempid>232</managerempid>
    </Emp>
    <Emp>
    <employeeid>1123</employeeid>
    <employeename>xyz</employeename>
    <designation>abc</designation>
    <managerempid>133</managerempid>
    </Emp>
    </EmpDetails>

  • Error In Mediator: ORAMED-01101:[Filter Expression Error]

    Hi All,
    Logic in Mediator:
    If Target_ID is "A", route to "Queue_A",
    If Target_ID is "B", route to "Queue_B", etc etc.
    This list of values has been maintained in DVM like mentioned below.
    <description/>
    <columns>
    <column name="DEST_SYSTEM"/>
    <column name="DEST_QUE"/>
    </columns>
    <rows>
    <row>
    <cell>A</cell>
    <cell>Queue_A</cell>
    </row>
    Issue is: If target ID is blank, it throws error like
    <faultstring>oracle.tip.mediator.infra.exception.MediatorException: ORAMED-01101:[Filter Expression Error]Error evaluating filter expression.Possible Fix:Ensure that the filter expression is valid, otherwise Contact Oracle Support Services.</faultstring>
    Can anybody help that how to handle this type of error in mediator to send customized fault as "Target ID is blank, please pass the request again."
    Regards,
    Richa

    Hi Richa,
    Mediator doesn't provide any built-in exception-handling mechanism, the policy-based fault handler is the only way to catch and handle exceptions occurring in the Mediator
    Write Fault Policies to handle Mediator faults : Add following snippet
    > <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults"
    > name="medns:mediatorFault">
    > <condition>
    <test>$fault.code="ORAMED-01101"</test>> <action ref="my-mediator-fault-handler"/>
    > </condition>
    > </faultName>
    And write Fault Actions for the above like ...ora-rethrow-fault.....
    Hope it helps !!
    Regards,
    Abhinav Gupta

  • "not a GROUP BY expression" error when using EclipseLink

    I'm using EcliseLink 2.3.0
    The follow SQL can be executed successfully.
    select to_char(o.taskDate, 'YYYY/MM'), sum(o.plannedHrs) from TaskItem o group by to_char(o.taskDate, 'YYYY/MM');
    But the JPQL has an error when it gets excuted.
    select FUNC('to_char', o.taskDate, 'YYYY/MM'), sum(o.plannedHrs) from TaskItem o group by FUNC('to_char', o.taskDate, 'YYYY/MM')
    ERROR LOG:
    Local Exception Stack:
    Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00979: not a GROUP BY expression
    Error Code: 979
    Call: SELECT to_char(TASK_DATE, ?), SUM(PLANNED_HRS) FROM ORA47111.S_PROJ_PLAN_ITEM GROUP BY to_char(TASK_DATE, ?)
         bind => [2 parameters bound]
    Query: ReportQuery(referenceClass=TaskItemDAO sql="SELECT to_char(TASK_DATE, ?), SUM(PLANNED_HRS) FROM ORA47111.S_PROJ_PLAN_ITEM GROUP BY to_char(TASK_DATE, ?)")
         at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
         at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1702)
         at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:566)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:264)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:646)
         at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2592)
         at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2535)
         at org.eclipse.persistence.queries.ReportQuery.executeDatabaseQuery(ReportQuery.java:846)
         at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:829)
         at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1056)
         at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:390)
         at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1144)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2863)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1501)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1483)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1457)
         at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:485)
         at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:742)
         at projapis.projrollup.beans.ManagedTaskItemDAOBean.calcResourcePlannedHrsInMonth(ManagedTaskItemDAOBean.java:329)
         at projapis.projrollup.beans.ManagedTaskItemDAOBean.main(ManagedTaskItemDAOBean.java:522)
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00979: not a GROUP BY expression
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:931)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:607)
         ... 22 more
    Any suggestion?
    Thanks a lot.
    Edited by: sgao on Jul 19, 2011 11:13 PM

    Hello,
    Unfortunately it is the driver complaining about the SQL that is generated, but I see no major difference from the SQL in the exception:
    SELECT to_char(TASK_DATE, ?), SUM(PLANNED_HRS) FROM ORA47111.S_PROJ_PLAN_ITEM GROUP BY to_char(TASK_DATE, ?)
    and the SQL you state works other than it looks like JPQL not SQL: select to_char(o.taskDate, 'YYYY/MM'), sum(o.plannedHrs) from TaskItem o group by to_char(o.taskDate, 'YYYY/MM');
    Does it work if the SQL in the exception is executed as a native query? Since this the driver complaining about what looks correct, I would look at the driver/database versions to see if there is a later version that might have a bug that has been fixed.
    Best Regards,
    Chris

  • Airport express error -15000. Any ideas on what causes this error?

    I keep getting airport express error -15000 when I try to play a song from itunes to speakers set up throught the airport express.

    Error -3256 or -15000 when streaming to AirPort Express base stations using iTunes
    http://support.apple.com/kb/TS2278

  • Expression Error: Named Object: javax.faces.convert.IntegerConverter not fo

    I get the error below when i try to run the xhtml file.
    May I know how to import the "IntegerConvertor"?
    >
    Expression Error: Named Object: javax.faces.convert.IntegerConverter not found.
    >
    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"     xmlns:h="http://java.sun.com/jsf/html"     xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
         <title>Facelet Title</title>
    </h:head>
    <h:body>
    <h:inputText converter="javax.faces.convert.IntegerConverter" />
    </h:body>
    </html>Edited by: anIdiot on 12-Dec-2011 23:52

    <f:converter converterId="javax.faces.Integer"/>

Maybe you are looking for