Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8383299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:07:51+00:00 2026-06-09T17:07:51+00:00

I’m putting together a query which references a table via an alias on numerous

  • 0

I’m putting together a query which references a table via an alias on numerous occasions, but it then proceeds to state:

*ORA-00904: “MPAN_STATUS”.”MPANCORE”: invalid identifier
00904. 00000 – “%s: invalid identifier”
*Cause:
Action:
Error at Line: 43 Column: 126

The query is as follows:

SELECT readings.mpancore, mtds.meterid, (SELECT CASE
                                                  WHEN meter_type 
                                                  LIKE 'RCAM%' AND
                                                       retrieval_method = 'R'
                                                  THEN 'TRUE' 
                                                  ELSE 'FALSE' END
                                                  FROM edmgr.mtds
                                                 WHERE meter_removed IS NULL) "IS_SMART",
                                          (SELECT CASE 
                                                  WHEN flowversion = 'D0010'          AND
                                                       readings.filename IS NOT NULL  AND
                                                       readings.filedate >= mpan_status.ssd 
                                                  THEN 'TRUE' 
                                                  ELSE 'FALSE' END
                                                  FROM edmgr.readings, edmgr.mpan_status
                                                 WHERE readings.mpancore = mpan_status.mpancore) "D0010_RECEIVED",
                                          (SELECT CASE 
                                                  WHEN effective_from_date >= mpan_status.ssd AND
                                                       dc_id = mpan_status.confirmed_dc_id          
                                                  THEN 'TRUE' 
                                                  ELSE 'FALSE' END
                                                  FROM edmgr.D0019_reg, edmgr.mpan_status) "D0019_RECEIVED",
                                          (SELECT CASE 
                                                  WHEN file_date_time <= SYSDATE-409       
                                                  THEN 'TRUE' 
                                                  ELSE 'FALSE' END
                                                  FROM edmgr.D0019_reg) "RF_READ",
                                          (SELECT CASE 
                                                  WHEN file_date_time <= SYSDATE-220       
                                                  THEN 'TRUE' 
                                                  ELSE 'FALSE' END
                                                  FROM edmgr.D0019_reg) "R3_READ",
                                          (SELECT CASE 
                                                  WHEN file_date_time <= SYSDATE-118       
                                                  THEN 'TRUE' 
                                                  ELSE 'FALSE' END
                                                  FROM edmgr.D0019_reg) "R2_READ",
                                          (SELECT CASE 
                                                  WHEN file_date_time <= SYSDATE-56        
                                                  THEN 'TRUE' 
                                                  ELSE 'FALSE' END
                                                  FROM edmgr.D0019_reg) "R1_READ"   
        FROM edmgr.mpan_status "mpan_status" LEFT JOIN edmgr.D0019_reg "D0019"   ON mpan_status.mpancore = D0019.metering_system_id
                                             LEFT JOIN edmgr.readings "readings" ON mpan_status.mpancore = readings.mpancore
                                             LEFT JOIN edmgr.mtds "mtds"         ON readings.mpancore    = mtds.mpancore 
                                                   AND D0019.metering_system_id                          = mtds.mpancore
                                                   AND mtds.meterid                                      = readings.meterid

I’m a complete novice really, so any assistance would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:07:52+00:00Added an answer on June 9, 2026 at 5:07 pm

    Let’s start off defining the ORA-00904 error:

    ORA-00904 string: invalid identifier
    Cause: The column name entered is either missing or invalid.

    Action: Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #.

    If it contains other characters, then it must be enclosed in double quotation marks. It may not be a reserved word.

    Also it would be a case-sensitivity issue (where you put mpan_status in quotes, in the FROM argument.) In Oracle, column names are case-sensitive only when you put them in quotes.

    EDIT:

    Here’s a suggestion of I would write the query (avoiding the use of ANSI joins, and subqueries).

    SELECT  readings.mpancore,
            mtds.meterid,
            CASE  
                WHEN meter_type LIKE 'RCAM%' AND retrieval_method = 'R' THEN 'TRUE' 
                ELSE 'FALSE' 
            END AS "IS_SMART"
    FROM    edmgr.mpan_status,
            edmgr.mtds,
            edmgr.D0019_reg,
            edmgr.readings
    WHERE   mpan_status.mpancore = D0019_reg.metering_system_id
        AND mpan_status.mpancore = readings.mpancore
        AND readings.mpancore    = mtds.mpancore
        AND D0019_reg.metering_system_id = mtds.mpancore;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.