Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I was searching for a solution in my problem and I could't find anything...
I have 2 tables:
tab1:
load
A,B,C
1,100,x
2,101,x1
3,102,x2
from table1.qvd;
tab2:
load
A,D,F
1,200,y1
2,201,y2
3,202,y3
4,203,y4
5,204,y5
6,205,y6
from table2.qvd;
Ok. So, after I load the first table, I would like the second table to be loaded only with the values for A field that are in tab1.
Something like:
load A where A=tab1(A) , D, F
........
I was looking for this solution because I have to load a very large amount of data, and I need this condition, that might be preaty simple...
Thank you a lot!
Silv
try
tab1:
load
A,B,C
1,100,x
2,101,x1
3,102,x2
from table1.qvd;
tab2:
load
A,D,F
1,200,y1
2,201,y2
3,202,y3
4,203,y4
5,204,y5
6,205,y6
from table2.qvd where exists (A);
Is there a function that can be used...something like RESIDENT tab1 ...but I don't know how to inprove it in my code...
If I use joins, it creates me only one table, but I would like to have the first table in the initial load format, and the second one to be loaded only for A field values that are in tab1.
Anyone can give me a hint?...
try
tab1:
load
A,B,C
1,100,x
2,101,x1
3,102,x2
from table1.qvd;
tab2:
load
A,D,F
1,200,y1
2,201,y2
3,202,y3
4,203,y4
5,204,y5
6,205,y6
from table2.qvd where exists (A);
Thank you very much swuehl.
This solved my problem.
I thought I had to use RESIDENT table, and my search was in that way...never think for this solution:))
Thx again!
Sorry for this reply, but i handle another error in executing the script.
tab1:
load
A,B,C
1,100,x
2,101,x1
3,102,x2
from table1.qvd;
tab2:
load
X as A,D,F
1,200,y1
2,201,y2
3,202,y3
4,203,y4
5,204,y5
6,205,y6
from table2.qvd where exists(A) ; - error "field A not found"
try
...
where exists(A,X);
solved.
Thank you!