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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:08:26+00:00 2026-05-16T16:08:26+00:00

———- User ———- user_ID(pk) UserEmail ———- Project_Account ———- actno actname projno projname ProjEmpID ProjEmpMGRID

  • 0
----------
User
----------
user_ID(pk)
UserEmail

----------
Project_Account
----------
actno
actname
projno
projname
ProjEmpID
ProjEmpMGRID

Where ProjEmpID,ProjEmpMGRID is the user_id and ProjEmpMGRID can be null.
I need to look up the useremail and display the table project_account. I need to query with actNo which has duplicate values.

My query goes like this:

 select projno,projname,actno,actname,
(select u.user_email as project_manager from project_account c left outer join users u
     on u.user_id = c.ProjEmpID where actno='some no')as project_manager,

     (select u.user_email as program_manager from project_account c left outer join users u
        on u.user_id = c.ProjEmpMGRID where actno='someno') as program_manager

        from project_account where actno='someno'

The error message I get in Oracle:

ora-01427 single row subquery returns
more than one row

As my subquery returns more than one email id, I get this error. As I said, act no is not unique. I could understand the error, but I couldn’t figure out the solution. I am doing a left outer join in a subquery because there might be nulls in prog manager id.

Any help would be 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-05-16T16:08:27+00:00Added an answer on May 16, 2026 at 4:08 pm

    The error you are getting is that one of your subqueries (either for project_manager or program_manager) is giving you back more than one ID based on your conditions. This kind of makes sense, since multiple project accounts could have the same “actno” since you haven’t specified that as a Primarky Key (pk)

    furhter, rather than using subqueries, just join directly to the user tables to find the IDs

     select projno,projname,actno,actname,
      project_user.user_email as project_manager,
      program_user.user_email as program_manager
        from project_account 
        left join User as project_user
          on project_account.ProjEmpID = project_user.user_id
        left join User as program_user
          on project_account.ProjEmpMGRID = program_user.user_id
    
    where actno='someno'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I basically have the classic many to many model. A user, an award, and
I recently ran against a very interesting site that expresses a very interesting idea
By fixed vector I mean a static list of values, like 1 through 24.
I'm including a local class that requests a file from a remote server. This
I'm using some of Firefox's specially-defined values for cursor, in particular -moz-zoom-in -moz-zoom-out -moz-grab
My app uses a WebRequest at certain points to get pages from itself. This
This is a follow-up to the question: Should the folders in a solution match
I've got a typical impedance mismatch where the data is stored in a normalized
I've an ASCII file that contains an EM Dash (— or — in HTML).
I have text I am displaying in SIlverlight that is coming from a CMS

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.