Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I join two Oracle tables on Script load
When you load the two tables. Say you have given table names A and B.
Now in these tables for them to join see that you have the same field name in A and B using which it has to join.
example
A has f1,f2,f3 fields
B has f4,f5,f6 fields
and I want to join f1 and f4
Then I must say
Connection string here
A:
Load f1 as Link,f2,f3;
SQL Select f1,f2,f3 FROM tablename;
B:
Load f4 as Link,f5,f6;
SQL Select f1,f2,f3 FROM tablename;
Note, that I give same alias to the field names using which I must be able to join the tables.
You can press CTRL+T and go to table viewer and see if the joins have happened.
thanks,
Rajesh Vaswani
Hi,
Write this way
Rep_Details:
LOAD
`Rep_Id`;
SQL SELECT *
FROM Data;
Join
Rep_Category:
LOAD `Rep_Id`,
`Rep_Name`,
`Category_Desc`;
SQL SELECT *
FROM `Rep_Category`;
Regards
Anand