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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:47:00+00:00 2026-05-23T16:47:00+00:00

I have two tables such as TableA and TableB. Schema for TableA: UoMID UoMName

  • 0

I have two tables such as TableA and TableB.

Schema for TableA:

     UoMID
     UoMName

Schema for TableB:

     ItemID
     ItemName
     UoMID
     D1_UoMID
     D2_UoMID
     D3_UoMID

Here I want to Join Both these tables based on UoMID in the TableA and UoMID, D1_UoMID, D2_UoMID and D3_UoMID in the TableB.
I want to retrieve the following columns:

     ItemName, UoMName, D1_UoMName, D2_UoMName and D3_UoMName

How to retreive the above columns? and How do I identify the UoMName for the Corresponding UoMID, D1_UoMID, D2_UoMID and D3_UoMID?

  • 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-23T16:47:00+00:00Added an answer on May 23, 2026 at 4:47 pm

    Using aliases, you can join to the same table multiple times and distinguish the results of the different joins. Try this:

    SELECT
        ItemName,
        d0.UoMName,
        d1.UoMName as D1_UoMName,
        d2.UoMName as D2_UoMName,
        d3.UoMName as D3_UoMName
    from TableB tb
    join TableA d0 on d0.UoMID = tb.UoMID
    join TableA d1 on d1.UoMID = tb.D1_UoMID
    join TableA d2 on d2.UoMID = tb.D2_UoMID
    join TableA d3 on d3.UoMID = tb.D3_UoMID;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have these two tables : TABLEA TABLEB ----------- ----------- ID | NAME
I have two tables such as STR_IndentHeader and STR_IndentDetail. STR_IndentDetail: IndentID ItemID ItemStatusID --------
In Access 2007, I have two tables related such that the (surrogate) PK of
If I have two tables such as this: CREATE TABLE #table1 (id INT, name
I have two tables as such: Categories: ID - Name - Desc Items ID
I have two tables parent and child (related as such on PK/FK GUID) Child
I have two fields in a table. One contains values such as BTA, BEA,
I have two tables that are joined together. A has many B Normally you
I have two tables, Book and Tag , and books are tagged using the
We have two Tables: Document: id, title, document_type_id, showon_id DocumentType: id, name Relationship: DocumentType

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.