You need to sign in to do that
Don't have an account?
Lukasz Piziak
Multiple criteria selection on Where SOQL query
Hi,
I'm looking for help with creating WHERE query.
My current query:
salesOrderList = [SELECT Name, SCMC__Customer_Account__c, Type__c, SCMC__Current_Promise__c, SCMC__Shipment_Status__c
From SCMC__Sales_Order__c Where Type__c='Production_Sales_Order' Order by SCMC__Current_Promise__c];
I would like to add another filter condition
Where Type__c='Production_Sales_Order'
AND
SCMC__Shipment_Status__c='Pending Pulling All Items'
AND
SCMC__Shipment_Status__c='Pending Pulling Partial Items Ordered'
Thank you for any help.
I'm looking for help with creating WHERE query.
My current query:
salesOrderList = [SELECT Name, SCMC__Customer_Account__c, Type__c, SCMC__Current_Promise__c, SCMC__Shipment_Status__c
From SCMC__Sales_Order__c Where Type__c='Production_Sales_Order' Order by SCMC__Current_Promise__c];
I would like to add another filter condition
Where Type__c='Production_Sales_Order'
AND
SCMC__Shipment_Status__c='Pending Pulling All Items'
AND
SCMC__Shipment_Status__c='Pending Pulling Partial Items Ordered'
Thank you for any help.
OR operator will check if any one of the condition is true
All Answers
I believe that you want 'Pending Pulling All Items' OR 'Pending Pulling Partial Items Ordered' instead of AND
try this soql
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Alex
OR operator will check if any one of the condition is true