Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two Fields
FieldA has two values A and B
FieldB has Y and N
FieldC has numbers.
I am trying to fetch values from FieldC based on condition on FieldA and FieldB in the Load Script as below:
if([FieldA]='A' and [FieldB]='Y', [FieldC])
If FieldA has A and FieldB has Y as values, then the column FieldC should get all the values corresponding to the condition. But I get this error saying Invalid Expression. How to achieve this in Load Script level.
As per your requirement , Sunny' solutions should work ...
Try Below:
Data:
Load IF(FieldA='A' and FieldB = 'Y', FieldC) as FieldC;
Load * Inline [
FieldA, FieldB, FieldC
A,Y,1
B,Y,2
C,N,3
A,N,4
A,Y,5
B,Y,6
C,Y,7
];
//You can replace the Inline code with your own Data load
There is always this option available:
Preparing examples for Upload - Reduction and Data Scrambling