Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2009
    Posts
    3

    Unanswered: ORA-00904:invalid identifier

    SELECT GEO, FAMILY,
    SUM(SALES_AMT) AS sum1,
    (SELECT SUM(SALES_AMT)
    FROM FINANCIAL_SALES_MV
    WHERE TRANSACTION_YEAR = 2009 AND TRANSACTION_DT = TO_DATE('01-Jan-2009') AND GEO = 'AP' AND FAMILY='XYZ'
    GROUP BY GEO, FAMILY) sum2 , sum1+sum2
    FROM FINANCIAL_SALES_MV
    WHERE TRANSACTION_YEAR = 2008 AND GEO = 'AP' AND FAMILY_NM='XYZ'
    GROUP BY GEO, FAMILY

    i want to add the data col3 and col4 from the output of this query.. however its flagging ORA-00904:invalid identifier, please help!!!!

  2. #2
    Join Date
    Sep 2009
    Posts
    44
    Invalid identifier means you're referring to a column name or table name that doesn't exist. Check for spelling mistakes.

    It might be masking another error. This is suspect:

    Code:
    GROUP BY GEO, FAMILY) sum2 , sum1+sum2
    This probably ought to be:

    Code:
    group by geo, family) as sum2, sum1 + sum2 as sum3
    Or something like that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •