Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Display flag for OrderType cycle values

$
0
0

Hi Team,

I have a table with EquipmentNumber, OrderType, BreakdownIndicator and RowID columns and below are the values for one equipmentnumber,

EuipmentNumberOrderTypeBreakdownIndicatorRowIdFlag
145812PM04 1Yes
145812PM07 2Yes
145812PM07 3Yes
145812PM04 4Yes
145812PM07 5 
145812PM07X6 
145812PM07 7 
145812PM04 8Yes
145812PM04 9Yes
145812PM04 10Yes

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.


Viewing all articles
Browse latest Browse all 7129

Trending Articles