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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:02:12+00:00 2026-06-08T07:02:12+00:00

I have multiple column that i need to compare and join. This is the

  • 0

I have multiple column that i need to compare and join.

This is the table i need to use to compare others.

MainTable

--Check Number-- --Reimbursement--
-----1000-----------5800.11
-----1001-----------5802.12
-----1002-----------5801.13
-----1003-----------5800.11
-----1004-----------5804.14

Multiple tables like this that I need to compare

ChildTable1

--Check Number --Name----Total Cash---Bonus-
-----1003------John-------5500.11------300
-----1000------Jane-------5502.12------300
-----1002------Joe--------5501.13------300
-----1001------Jay--------5500.11------300
-----1004------Janie------5504.14------300

ChildTable2

--Check Number --Name----Total Cash---Bonus-
-----1013------John-------5500.11------300
-----1010------Jane-------5502.12------300
-----1002------Joe--------5501.13------300
-----1011------Jay--------5500.11------300
-----1014------Janie------5504.14------300

The End Result should be like this

--Check Number --Name----Total Cash---Bonus-----Reimbursement--
-----1003------John-------5500.11------300-----------5800.11
-----1000------Jane-------5502.12------300-----------5800.11
-----1002------Joe--------5501.13------300-----------5801.13
-----1001------Jay--------5500.11------300-----------5802.12
-----1004------Janie------5504.14------300-----------5804.14

not

--Check Number --Name----Total Cash1---Bonus1---------Total Cash2---Bonus2-----Reimbursement--
-----1003--------John-------5500.11------300------------------NULL------NULL-----------5800.11
-----1000--------Jane-------5502.12------300------------------NULL------NULL-----------5800.11
-----1002--------Joe--------5501.13------300------------------NULL------NULL-----------5801.13
-----1001--------Jay--------5500.11------300------------------NULL------NULL-----------5802.12
-----1004--------Janie------5504.14------300------------------NULL------NULL-----------5804.14

So I need to compare all tables against the Main table and join only the tables with the same check number

  • 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-08T07:02:14+00:00Added an answer on June 8, 2026 at 7:02 am

    You can do this as two separate queries and UNION them together:

    select mt.CheckNumber as CheckNumber,
      c1.name as Name,
      c1.TotalCash as TotalCash,
      c1.Bonus as Bonus,
      mt.Reimbursement as Reimbursement
    from MainTable mt
      inner join ChildTable1 c1 on c1.CheckNumber = mt.CheckNumber
    UNION
    select mt.CheckNumber as CheckNumber,
      c2.name as Name,
      c2.TotalCash as TotalCash,
      c2.Bonus as Bonus,
      mt.Reimbursement as Reimbursement
    from MainTable mt
      inner join ChildTable2 c2 on c2.CheckNumber = mt.CheckNumber
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an XML valued column that has multiple parent nodes. I need to
I need to get the last inserted id of table that have multi-column primary
I have a table (participants) which has multiple columns that could all be distinct.
I have table with date/time column and person column. Each person has multiple records
I need to have multiple lines in a cell, so I use DataGridViewTextBoxColumn.DefaultCellStyle.WrapMode =DataGridViewTriState.True.
i have a table name preferences under this there are multiple columns but i
I have an Oracle table with data that looks like this: ID BATCH STATUS
I have multiple tables with information about tube videos. I need to join these
MYSQL Database: I have a table of data that I need to put into
i have one table, let's call it 'TBL'. i have one column that have

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.