Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to eliminate project which have status =. Terminated. If status = terminated in any of the version, I don't want to display that project.
In above example Project name (Test 1) has status Terminated, In this case, I want to eliminate all 3 rows for Test 1
@manju421 in Script for example :
Data:
Load * inline [
Project name,version,Status
test 1,1,closed
test 1,2,closed
test 1,3,Terminated
test 2,1,closed
test 2,2,closed
];
left join load [Project name],'1' as Flag resident Data where Status='Terminated';
output:
noconcatenate
load * resident Data where Flag<>'1';
drop table Data;
drop fields Flag;
output:
You could solve this with a solution using NOT Exsists()
ExcludedList:
LOAD [Project name] as ExcludedProjectName
FROM source
WHERE Status= 'Terminated';
Final:
LOAD [Project name], Version, Status
FROM Source
WHERE Not Exists(ExcludedProjectName , [Project name] );
Drop table ExcludedList;