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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:04:19+00:00 2026-06-12T15:04:19+00:00

I have tow tables the first d001 has two col: ACC_ID, ACC_NAME | |

  • 0

I have tow tables the first d001 has two col:

ACC_ID, ACC_NAME
      |         |
      |         |  
      |         |

the secound d002 has four col

DATE ACC_ID_1, ACC_ID_2, ACC_ID_3, ACC_ID_4 
    |        |         |         |         |      
    |        |         |         |         |
    |        |         |         |         |

HOW i can make view contain

DATE, ACC_NAME1, ACC_NAME_2, ACC_NAME_3, ACC_NAME_4
    |          |           |           |           |      
    |          |           |           |           |
    |          |           |           |           |

i try left join but the result is just for one col!!!

  • 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-12T15:04:20+00:00Added an answer on June 12, 2026 at 3:04 pm

    You need to left join a total of 4 times!

    select t.date,
           a.acc_name acc_name1,
           b.acc_name acc_name2,
           c.acc_name acc_name3,
           d.acc_name acc_name4
    from d002 t
    left join d001 a on a.acc_id = t.acc_id_1
    left join d001 b on b.acc_id = t.acc_id_2
    left join d001 c on c.acc_id = t.acc_id_3
    left join d001 d on d.acc_id = t.acc_id_4
    

    Having said that, you should look at normalizing the data into 4 rows at your next convenient opportunity to revisit the table structure.

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

Sidebar

Related Questions

I have a PopupWindow that has tow buttons inside of it. They work as
I have tow tables concept_access and concept_access_log. I want to create a trigger that
I have tow tables named TableA and TableB Let us say TableA Id TableAName
i have tow input, style column and mediumCell. i want first input only have
At my work I have tow network connections, the first is WIFI and the
I have tow tables in my MySQL database - one with flights and one
I have two tables master and detail. When I add a new record to
I have tow tables where User (id,name) and UserInfo (user_id,email,date_edit) How i can do
How to show two images in a view one after another,I have tow images
I write a project using Prism . I have tow modules and this modules

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.