Skip to main content

Hi, 

 

Does anyone have any experience of using ‘or’ statements in demand flow SQL statements?

 

We are trying to create a demand flow for demand planner client using an “or” in the sql statement to exclude some customers.

 

Our statement is:

Select contract, part_no, issue_date, issue_qty from IFSAPP.external_invent_part_issue_pub  where CUSTOMER_NO <> 'CUST1' or CUSTOMER_NO <> 'CUST2'

 

The flow doesn't error out and is created in the client, but the quantities in the created flow are still the total demand, so no exclusions are being done.

 

Thanks

 

 

Hi,

I have used the following syntax in the past which may work for you;

Select contract, part_no, issue_date, issue_qty from IFSAPP.external_invent_part_issue_pub  where CUSTOMER_NO NOT IN ('CUST1', 'CUST2')

I hope that this helps.


Thanks Richard, tested and worked perfectly


Great! Thanks for the feedback! 🙂


Reply