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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:01:22+00:00 2026-05-20T02:01:22+00:00

Ok guys, im having a real issue trying to understand the logic behind the

  • 0

Ok guys, im having a real issue trying to understand the logic behind the aliasing in oracle. Here is the query:

select isbn,
       b.fname,
       b.lname
from   bookauthor a,
       author b,
       (select authorid auth
        from   bookauthor
        where  isbn = (select max(isbn) maxisbn
                       from   orderitems))
where  b.authorid = auth
       and isbn = maxisbn;  

for some reason, the dbms isn’t recognizing maxisbn as an alias, but if i get rid of everything regarding maxisbn, the query runs and recognizes the alias “auth” just fine. Why is it seeing one but not the other?

  • 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-05-20T02:01:22+00:00Added an answer on May 20, 2026 at 2:01 am

    maxisbn isn’t the name of any column exposed by your derived table’s SELECT list.

    In order for this syntax to work you would need to add it as a column as below.

    select isbn,
           b.fname,
           b.lname
    from   bookauthor a,
           author b,
           (select authorid auth, isbn maxisbn
            from   bookauthor
            where  isbn = (select max(isbn) maxisbn
                           from   orderitems))
    where  b.authorid = auth
           and isbn = maxisbn;  
    

    NB: There is probably definitely a more efficient way of writing this query (you shouldn’t need to access bookauthor twice) and I would always use explicit JOIN syntax. This is just to answer your specific question about why it doesn’t work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys I am having a lot of trouble trying to understand this and
Can you guys help me understand a concept real quick, I'm having trouble understanding
Hey guys im having a problem trying to program out a set of logic.
Hi guys i've never written a comparator b4 and im having a real problem.
Hey guys, I'm having a problem with IE7, my menu always drops down behind
HI Guys, Here I am having problem that How can I post an image
Hey guys I am having trouble trying to convert my web app to support
Hey Guys, having an issue with Linq-to-SQL, I am basically doing the following but
Hello guys can anyone help me with the issue im having with installation of
Hi guys having an issue with the reuters news feed. It is preventing my

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.