Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
can u share the structure of the 2 tables? how many columns in each one? what are the columns etc?
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
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:
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
Hi Sergio
i want to compare two tables in the base of fieldcontent:name = abas
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