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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:30:37+00:00 2026-06-07T12:30:37+00:00

I have a dataset and I am trying to find results that reference each

  • 0

I have a dataset and I am trying to find results that reference each other. I have a table that has “Applications” in it. There are 2 parties (people) involved with an Application. These are the “Applicant” and the “Receiver”.

I need to find out how to obtain data where person “A” has been an Applicant and person “B” has been a Receiver and then where they have forwarded another Application in reverse. So where Person “B” is the Applicant and person “A” is the Receiver. I need to return both of those lines as 1 row in my result set.

My Data Structure looks like this:

Application ID, Applicant Name, Applicant DOB, Receiver Name, Receiver DOB
1, Bob SMITH, 12/06/1980, Joe SMITH, 10/10/1979
2, Joe SMITH, 10/10/1979, Bob SMITH, 12/06/1980
3, Betty DAVIS, 15/05/1986, Barry DAVIS, 29/07/1981
4, Barry DAVIS, 29/07/1981, Betty DAVIS, 15/05/1986

As you can see there are 4 applications but in reality only 2 “Cross Applications”. I am trying to get an end result to look like this showing the unique Cross Applications:

Application ID 1, Applicant Name 1, Applicant DOB 1, Receiver Name 1, Receiver DOB 1, Application ID 2, Applicant Name 2, Applicant DOB 2, Receiver Name 2, Receiver DOB 2
1, Bob SMITH, 12/06/1980, Joe SMITH, 10/10/1979, 2, Joe SMITH, 10/10/1979, Bob SMITH, 12/06/1980
3, Betty DAVIS, 15/05/1986, Barry DAVIS, 29/07/1981, 4, Barry DAVIS, 29/07/1981, Betty DAVIS, 15/05/1986

The only thing I can compare between the two Applications is the Name and DOB (This is a constraint placed on me. It’s annoying as sometimes people spell names differently or put in wrong DOB). I only want to return the cross applications, where both people are matched.

I think I’d need to load Row “N” into a cursor and compare the Name and DOB with every other row in the dataset (N+1 to N+n) and if any matches are found then to put them into the output and move on to the next row. I’m not sure how to do this and would like some help if anyone can give any advice. Thanks!

  • 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-07T12:30:39+00:00Added an answer on June 7, 2026 at 12:30 pm

    Kindly try the below

        SELECT A.Application_ID "Application ID1",
               A.Applicant_Name "Applicant_Name1",
               A.Applicant_DOB "Applicant_DOB1",
               A.Receiver_Name "Receiver_Name1",
               A.Receiver_DOB "Receiver_DOB1",
               B.Application_ID "Application ID2",
               B.Applicant_Name "Applicant_Name2",
               B.Applicant_DOB "Applicant_DOB12",
               B.Receiver_Name "Receiver_Name2",
               B.Receiver_DOB "Receiver_DOB2"
    
          FROM     Applications A, Applications B
          WHERE   A.Applicant_Name=B.Receiver_Name
          AND      B.Applicant_Name=A.Receiver_Name
                    AND      B.Receiver_DOB =A.Applicant_DOB 
                    AND      A.Receiver_DOB =B.Applicant_DOB;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dataset that i am trying to set the default value as
I have a dataset with multiple tables. One table in particular has one record
I am trying to find all users with AD that have a birthday in
I currently have a dataset which has two columns that I'd like to compare.
I have the following data set that I am trying to plot with ggplot2,
I have a very large possible data set that I am trying to visualize
I have DataSet which has 3 columns. Name - insurance comp. name - treatmentDate
I have a DataSet , where in the first table and in the row
I am trying to find out what options I have if I wanted to
I am trying to deal with a very large dataset. I have k =

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.