Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have Table Like this:
Data_Temp:
Load * Inline [
Emp_Role
X
];
Data:
Load ID,
Employee_Name,
Emp_Role,
Code
From.............. Wher Exists(Emp_Role);
The above Script Will load only Where Emp_Role=X For All fields. But i also want to load only Code =100.So for that what should i do now can any one help me on this.
May be this:
Data_Temp:
Load * Inline [
Emp_Role
X
];
Data:
Load ID,
Employee_Name,
Emp_Role,
Code
From..............
Where Exists(Emp_Role) and Code = 100;
If i do Like that i ll will become un-optimized load right?
Yes it will be an un-optimized load
Is there any other solution?
Why bcoz i have huge data so I don't make this un-optimized.
So the long term answer is to create a multi stage load process and load your data to a QVD file first. Stage all of your data in QVD's and then do your high level load directly from QVD's only.
How about you create a combined field of [Emp_Role_and_Code].
Then do a suitable Inline load for this and a single Where Exists to get an optimised load.
hi,
i would use below script it would be more faster.
Data_Temp
Load * Inline [
Emp_Role
X ];
Data:
Load
ID,
Employee_Name,
Emp_Role,
Code
From...
where exists(Emp_Role);
inner join (Data)
load * Inline
[ Code
100];
drop table Data_Temp;
Look at what Bill has proposed. I don't know another way of doing it.
Bill solution
or if one of the fields will exclude a lot of records you can try with a 2 step optimized exists:
load inline first field
load optimized (exists) from qvd
store in qvd
load inline second field
load optimized (exists) from last stored qvd