Solved

Demand Planner Client - SQL Statement

  • 11 April 2023
  • 3 replies
  • 91 views

Badge +3

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

 

 

icon

Best answer by Richard Owen 11 April 2023, 14:25

View original

3 replies

Userlevel 5
Badge +12

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.

Badge +3

Thanks Richard, tested and worked perfectly

Userlevel 5
Badge +12

Great! Thanks for the feedback! 🙂

Reply