Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

compare 2 different tables on the base of content within field

Hi Folks,

i got a Situation, where i have two different tables, for example : tab1 has 2 Fields: id= 2, Name=abas and second table has id=6, Name = abas, as you see both tables have different id's but the same Name within column Name.

My question is, how to compare two tables with each other on the base of common fieldcontent.

Does anybody have any idea?

Thanks a lot

Beck

7 Replies
sergioskv
Contributor III
Contributor III

Hi,

Excuse me, i don't understand.

What do you want to compare?

id = 2 and id = 6 if they have same name?

You talking about data model or UI ?

Sergio Skv

OmarBenSalem

can u share the structure of the 2 tables? how many columns in each one? what are the columns etc?

beck_bakytbek
Master
Master
Author

Hello Omar,

thanks a lot for your responce, the structure of my tables does look like the following:

table1:

ID, Name

6, abas

table2:

ID, Name

3, abas

i have only two tables with two fields

Thanks a lot

OmarBenSalem

U're welcome Beck !

do as follow:

t1:

load NAME, ID as ID1  Inline [

ID, NAME

1, abas

2, omar

];

join(t1)

t2:

load NAME, ID as ID2 Inline [

ID, NAME

6, abas

2, omar

];

final:

NoConcatenate

load *, if(ID2=ID1,1,0) as FlagComparison Resident t1;

drop Table t1;

result:

Capture.PNG

beck_bakytbek
Master
Master
Author

Hi Omar,

thanks a lot for your time and Feedback, i wanted to know, whether is that possible to compare two tables on the base of Content of fields, in this case: Content = abas. you have used the field id, and as i see the flagcomparison for abas = 0, can i compare on the base of field: Name =abas

beck_bakytbek
Master
Master
Author

Hi Sergio

i want to compare two tables in the base of fieldcontent:name = abas

Mark_Little
Luminary
Luminary

Hi Beck,

You can join the Table on the Name column.

Something like,

Load

     ID as ID1,

     Name

From Table1

Join

Load

     ID as ID,

     Name

From Table2

Mark