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 7907219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:19:48+00:00 2026-06-03T11:19:48+00:00

I’m having the error ORACLE: ORA-00904: Invalid Identifier on: and l.cd_pergunta = e.cd_pergunta the

  • 0

I’m having the error ORACLE: ORA-00904: Invalid Identifier on:

and l.cd_pergunta = e.cd_pergunta

the invalid identifier is ‘e’, the prefix of cd_pergunta…

When i execute this query:

select count(*)
  from TEACEITE e
 inner join TEREGETA re on re.cd_etapa = e.cd_etapa
                       and re.id_reg_neg = 1.00000000
 where e.obrigatorio = 1
   and not exists
 (select 1
          from GESESSAO s
         inner join GERESPOS r on r.sessao = s.sessao_resp
                              and r.resposta_log = 1
         inner join GEEPE l on l.cd_quest = s.cd_quest
                           and l.ord_perg = r.ord_pergunta
                           and l.cd_pergunta = e.cd_pergunta
         where s.cd_quest = e.cd_quest
           and s.item = e.cd_etapa
           and s.origem = 'GC'
           and s.os_nf_orc_cont = 1.00000000)

Any idea?

  • 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-03T11:19:49+00:00Added an answer on June 3, 2026 at 11:19 am

    The problem is that the alias e is not available within the nested select and hence the “invalid identifier”.
    You can try to rewrite the query so that the conditions s.cd_quest = e.cd_quest and s.item = e.cd_etapa are part of the main select instead of the nested select.

    EDIT: I tried a few scenarios and the problem is that the alias e is not available during join resolution in the nested query. Looks like you cannot refer to an outer table alias in the join condition of the inner query.

    I believe that the following will work

      select count(*)
      from TEACEITE e
     inner join TEREGETA re on re.cd_etapa = e.cd_etapa
                           and re.id_reg_neg = 1.00000000
     where e.obrigatorio = 1
       and not exists
     (select 1
              from GESESSAO s
             inner join GERESPOS r on r.sessao = s.sessao_resp
                                  and r.resposta_log = 1
             inner join GEEPE l on l.cd_quest = s.cd_quest
                               and l.ord_perg = r.ord_pergunta
             where l.cd_pergunta = e.cd_pergunta
               and s.cd_quest = e.cd_quest
               and s.item = e.cd_etapa
               and s.origem = 'GC'
               and s.os_nf_orc_cont = 1.00000000)
    

    While this query may work, I am not sure if its accomplishing what you want, please ensure that your business logic is taken care of as well.

    • 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 have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.