Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Type_Of_Feedback | Call_No |
Very Bad | 2216336 |
Bad | 2214482 |
Bad | 2210228 |
Bad | 2214978 |
Very Bad | 2200440 |
Very Bad | 2205258 |
Bad | 2206982 |
Very Bad | 2213305 |
Bad | 2207265 |
Bad | 2228671 |
Very Bad | 2207265 |
Very Bad | 2228671 |
Wrt above data, i need to load only unique records. Among duplicate records, i need to load record with "Very Bad" feedback type.
Pls suggest how to achieve this.
What i am doing is as below, but m not able to get anything.
tmp:
Load Call_No, Type_Of_Feedback
From <Above Data Source>
Order By Call_No ASC, Type_Of_Feedback DESC;
Feedback:
Load Call_No, Type_Of_Feedback,'' as jj
Resident tmp
Where Not Exists(Call_No);
Drop Table tmp;
Hi Arun,
Try
Feedback:
LOAD Call_No , MaxString(Type_Of_Feedback) as TypeF
RESIDENT Tmp
GROUP BY Call_No;
Regards,
Joao
Feedback:
LOAD
Type_Of_Feedback, Call_No
RESIDENT Tmp
Where Type_Of_Feedback = 'Very Bad'
Group BY Type_Of_Feedback, Call_No;
regards,
FC
And to explain why your current approach isn't getting anything, the tmp table contains ALL call numbers. so when you look for call numbers that don't exist, there aren't any. All call numbers already exist.