Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
i have a requirement where i need to exclude few rows based on ID from the external file, without hard coding the ID since they change everyday.
Please find attcahed and the script section explain my question.
Thanks
Try a map:
Seq:
Mapping
LOAD Seq,'Y';
Load * inline [
Seq, Group
1,AAA
3,AAA
6,BBB];
Main:
LOAD ID,
Group,
Seq,
Amt
Where DelFlag = 'N';
LOAD *,
ApplyMap('Seq',Seq,'N') as DelFlag;
Load * inline [
ID, Group,Seq, Amt
1,AAA,1,100
1,AAA,2,110
1,AAA,3,800
1,AAA,4,900
2,AAA,1,200
3,BBB,1,200
3,BBB,2,200
3,BBB,6,200
3,BBB,7,200
4,CCC,8,300
5,DDD,9,300];
Try a map:
Seq:
Mapping
LOAD Seq,'Y';
Load * inline [
Seq, Group
1,AAA
3,AAA
6,BBB];
Main:
LOAD ID,
Group,
Seq,
Amt
Where DelFlag = 'N';
LOAD *,
ApplyMap('Seq',Seq,'N') as DelFlag;
Load * inline [
ID, Group,Seq, Amt
1,AAA,1,100
1,AAA,2,110
1,AAA,3,800
1,AAA,4,900
2,AAA,1,200
3,BBB,1,200
3,BBB,2,200
3,BBB,6,200
3,BBB,7,200
4,CCC,8,300
5,DDD,9,300];