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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:39:40+00:00 2026-06-08T09:39:40+00:00

I previously ask on how to join multiple tables thru MYSQL but now I

  • 0

I previously ask on how to join multiple tables thru MYSQL but now I encountered a new issue.

Say I have these several tables.

Reimbursement Table

-Name---Check Number-----Date------Reimbursement--
-John-----1--------------7/23/12-------$100-------
-Joe------2--------------7/23/12-------$102-------
-Jane-----3--------------7/23/12-------$103-------
-Jill-----4--------------7/23/12-------$104-------

Original Claim

-Name---Check Number-----Date---------Amount--
-John-----1--------------7/23/12-------$100---
-Joe------2--------------7/23/12-------$102---
-Jane-----3--------------7/23/12-------$103---
-Jill-----4--------------7/23/12-------$100---

Adjusted Claim

-Name---Check Number-----Date---------Amount--
-Jill-----4--------------7/23/12-------$4-----

End Result through crystal report should be

-Name---Check #---Claim Type----Date Paid----Amount----Reimbursement--
-John-----1-------Original--------7/23/12-----$100-------$100---------
-Joe------2-------Original--------7/23/12-----$102-------$102---------
-Jane-----3-------Original--------7/23/12-----$103-------$103---------
-Jill-----4-------Original-------7/23/12------$100-------$104---------
-Jill-----4-------Adjusted-------7/23/12------$4----------------------

not

-Name---Check #---Claim Type----Date Paid----Amount----Reimbursement--
-John-----1-------Original--------7/23/12-----$100-------$100---------
-Joe------2-------Original--------7/23/12-----$102-------$102---------
-Jane-----3-------Original--------7/23/12-----$103-------$103---------
-Jill-----4-------Original-------7/23/12------$100-------$104---------
-Jill-----4-------Adjusted-------7/23/12------$4---------$104---------

my current script is:

Select  mt.`Check Number` as `Check Number`,
        mt.`Payment Date` as `Payment Date`,
        mt.`Payment Type` as `Payment Type`,
        c1.`Facility Name` as `Facility Name`,
        'Adjustment June 2012' as `Claim Type`,
        c1.`Amount` as Amount,
        mt.Reimbursement as Reimbursement 
  From  Reimbursement mt 
               Inner Join ClaimAdjust_6_2012 c1 
                  on c1.`Check Number`  = mt.`Check Number` and 
                     mt.`Payment Date` = c1.`Payment Date` 
  Where mt.`Payment Date`>='2012-7-1' And 
        mt.`Payment Date`<'2012-8-1' 

Union 

Select  mt.`Check Number` as `Check Number`,
        mt.`Payment Date` as `Payment Date`,
        mt.`Payment Type` as `Payment Type`,
        c1.`Facility Name` as `Facility Name`,
        'Original June 2012' as `Claim Type`,
        c1.`Amount` as Amount,
        mt.Reimbursement as Reimbursement 
 From   Reimbursement mt 
              Inner Join Claim_6_2012 c1 
                    on c1.`Check Number`  = mt.`Check Number` and 
                        mt.`Payment Date` = c1.`Payment Date` 
Where   mt.`Payment Date`>='2012-7-1' And 
        mt.`Payment Date`<'2012-8-1'  
  • 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-08T09:39:42+00:00Added an answer on June 8, 2026 at 9:39 am

    Does this query work? Why don’t you only JOIN the Reimbursement Table and Original Claim and UNION it with Adjusted Claim

    SELECT      a.Name, a.CheckNumber, a.`Date`,
                b.Amount, a.Reimbursement
    FROM        Reimbursement a INNER JOIN
                    OrginalClaim b ON
                        a.Name = b.Name AND
                        a.CheckNmber = b.CheckNumber AND
                        a.`Date` = b.`Date`
    UNION
    SELECT      Name, CheckNumber, `Date`, Amount, NULL as Reimbursement
    FROM        AdjustedClaim
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Previously, I have worked on local notifications, but I got problem in it now.
I have a problem that I tried to ask about previously, but didn't get
I have a problem relating my web project. Previously when my professor ask me
Previously I asked you about ways to test sending multiple emails at once. Now
I have posted a question on here previously asking similar advise, but this project
that´s my first question in stackoverflow . I have two MYSQL tables: categories and
I previously ask about converting strings to dates and formatting them.. split string based
Sorry to ask this, but with previouse reading, re-reading of doc and all the
I was getting help related to a previous question but then told to ask
I hate to be the third person to ask this, but the previous two

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.