cancel
Showing results for 
Search instead for 
Did you mean: 

Flexible Query for filtering Orders based on Order Entry status

anilkreddy-cts
Explorer
0 Kudos

Hi Experts,

I'm looking for flexible search query to get orders where at least one of the entry's status is not CANCELLED.

If all the entries have status as CANCELLED then ignore that entire order in the result.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member634058
Active Participant
0 Kudos

Hi,

You can simply write a query to get order code for entries whose status is not cancelled.

Since you are NOT looking for orders where ALL the entries are cancelled, running the following query will be enough to get the correct data:

select DISTINCT {order} from {orderentry} where {status} != 'CANCELLED'

NOTE: Please fix the query to correct attribute names and pk values, wherever necessary.

Thanks.