Hi Team,
I have a table with EquipmentNumber, OrderType, BreakdownIndicator and RowID columns and below are the values for one equipmentnumber,
EuipmentNumber | OrderType | BreakdownIndicator | RowId | Flag |
145812 | PM04 | 1 | Yes | |
145812 | PM07 | 2 | Yes | |
145812 | PM07 | 3 | Yes | |
145812 | PM04 | 4 | Yes | |
145812 | PM07 | 5 | ||
145812 | PM07 | X | 6 | |
145812 | PM07 | 7 | ||
145812 | PM04 | 8 | Yes | |
145812 | PM04 | 9 | Yes | |
145812 | PM04 | 10 | Yes |
I need to display the 'Flag' column in the result set as mentioned above to identify the cycle values without breakdown indicator values. Here is the logic for this,
1. Need to set the flag 'Yes' for the cycle values PM04 to PM04 in the OrderType and if there is any breakdownindicator value 'X' then we can not consider that cycle for Flag.
Any help would be greatly appreciated.
Thanks,
Venu.