Skip to main content
Solved

Demand Planner Client - SQL Statement

  • April 11, 2023
  • 3 replies
  • 122 views

Forum|alt.badge.img+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

 

 

Best answer by Richard Owen

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.

3 replies

Richard Owen
Superhero (Employee)
Forum|alt.badge.img+15
  • Superhero (Employee)
  • Answer
  • April 11, 2023

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.


Forum|alt.badge.img+3
  • Author
  • Do Gooder (Customer)
  • April 11, 2023

Thanks Richard, tested and worked perfectly


Richard Owen
Superhero (Employee)
Forum|alt.badge.img+15
  • Superhero (Employee)
  • April 11, 2023

Great! Thanks for the feedback! 🙂