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

  • Home
  • SEARCH
  • 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 473983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:14:30+00:00 2026-05-13T00:14:30+00:00

I have two tables: EMP emp_id | Name | Surname | 1 | Bob

  • 0

I have two tables:

EMP

emp_id | Name | Surname | 
1      | Bob | Park    | 
2      | Annie| South   |  
3      | Eric | P.      |

PROJECT

proj_id | Tester_1 | Tester_2 | Tester_3 |
1       |     2    |    3     |    1     |

Now I am trying to make a view, so that I have the following

proj_id | Tester_1_Name   | Tester_2_Name   |     Tester_3_Name
1       |      Annie      |     Eric        |          Bob
  • 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-13T00:14:30+00:00Added an answer on May 13, 2026 at 12:14 am

    You just have to Join

       Select proj_id, 
          t1.name + ' ' + t1.surname tester1,
          t2.name + ' ' + t2.surname tester2,
          t3.name + ' ' + t3.surname tester3
       From Project p 
         Left Join Emp t1 On t1.emp_id = p.Tester_1
         Left Join Emp t2 On t2.emp_id = p.Tester_2
         Left Join Emp t2 On t3.emp_id = p.Tester_3
    

    As a View…

      Create View ProjectWithTesters
      As 
           Select proj_id, 
              t1.name + ' ' + t1.surname tester1,
              t2.name + ' ' + t2.surname tester2,
              t3.name + ' ' + t3.surname tester3
           From Project p 
             Left Join Emp t1 On t1.emp_id = p.Tester_1
             Left Join Emp t2 On t2.emp_id = p.Tester_2
             Left Join Emp t2 On t3.emp_id = p.Tester_3
    

    NOTE: As others mentioned, your database design violates First Normal Form “There should be no repeating groups”, which means that a table should not contain multiple columns which represent multiple instances of some attribute (like your tester_1, tester_2, tester_3). Check out this link: database normalization for more info.

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

Sidebar

Related Questions

I have two tables. Table Emp id name 1 Ajay 2 Amol 3 Sanjay
I have two tables: Sales_Order Order_ID Buyer_ID Emp_ID Status (ENUM) 1 2 3 P
I have two tables, for example: Table A Table B ======= ======= Name |
I have two tables to join with a column (say emp_id ).. if emp_id
Let's say I have two tables, employee and department where emp has a @ManyToOne
Suppose I have two tables 1st table emp EmpID | EmpName|xyz...coloums 1. | Hrishi
I have two tables: emp (empno,ename) address(empno,address) emp can have 0 or more address.
I have two tables TABLE : EMPLOYEE EMP_ID EMP_NAME EMP_TYPE 1 Shwetha 1 2
Suppose I have a dataset with those two immortal tables: Employee & Order Emp
I have two tables: COUNTRY ------------- id name NEIGHBOUR ------------- id id_country1 id_country2 id_country1

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.