Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a Problem while joining two tables , table1 and table2 having two different column names(Emp_ID and E_Id) but same data.
Table1:
Emp_ID Emp_Name Dept_No
Table2:
E_Id C_Address
Can any one help how to join these two tables.
Hi
Alias the names to the same name. Like this:
Table1:
LOAD Emp_ID,
...;
Join (Table1)
LOAD E_Id As Emp_ID,
...'
HTH
Jonathan
Hi
Alias the names to the same name. Like this:
Table1:
LOAD Emp_ID,
...;
Join (Table1)
LOAD E_Id As Emp_ID,
...'
HTH
Jonathan
Hi Kalyan,
You have rename your field name by using aliases .the below clear your doubt...
Try like this ---
Load
EMP_ID As Key
Emp_Name
Dept_No
from path
inner join (diffrent types of join you can use here..)
Load
E_id As Key
C_Address
from path
Hope this will help you !!!!!
Regrads
Sarfaraz Sheikh
Hi,
Try this
load
Emp_ID,
Emp_Name,
Dept_No;
from Table1;
left join
load
E_Id as Emp_ID,
C_Address;
from Table2;
Regards
ASHFAQ
hi kalyan
this is easy. first, you change the field name E-Id as Emp_ID then, join the two tables as
load *
from table1_path
join
load * from table2_path
cheers,
kunal bhattacharjee
Hi,
When joining two table they need exactly same field names then rename that fields and write like
Table1:
Load
Emp_ID,Emp_Name, Dept_No
From Location;
Left Join
Table2:
Load
E_Id as Emp_ID, C_Address
From Location;
Regards
Anand