Combine two database tables

Hi Readers,

I have two tables

Table-A with columns:- ID_A, Job_Role, Company_Name
Table-B with columns:- Member_ID, Name, PhoneNumber, ID_A

which are related as one to many relations

I have created record type for different these tables and added relation ships in the record type as well, Would like to know can we consolidate them as below requirement

rows which i want to display are 

Member_ID Job_Role Company_Name Name Phone_Number
1 DBA ABC.ltd SSR 1234567890
2 DBA ABC.ltd RC 0987654321
3 SysAdmin ABC.ltd NTR 6789054321
4 SysAdmin ABC.ltd RRR 1234567098
5 HR ABC.ltd MB 0984562348

Below are the tables structure


Table-A is as below

ID_A(PK) Job_Role Company_Name
1 DBA ABC.ltd
2 SysAdmin ABC.ltd
3 HR ABC.ltd

Table - B is as below

Member_ID Name Phone_Number ID_A(FK)
1 SSR 1234567890 1
2 RC 0987654321 1
3 NTR 6789054321 2
4 RRR 1234567098 2
5 MB 0984562348 3

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    A Score Level 2
    in reply to Peter Lewis

    Hello there! I have a similar scenario. I have two tables: Tasks A and Tasks B and I need a Consolidated Task record to show the columns both tables have in common.

    One option is to create a DB View with the subset of columns from each table as

    (Create view ConsolidatedTasks as Select column1, column2 from TasksA UNION Select column1, column2 from TasksB)

    but then I'll have to create an API and integration to retrieve the data for the View as the source for the record type, right? It feels like over complicating it. Any suggestions for this scenario?

Children