General X++ Development
How do I add an OR condition to an X++ select statement?
How do I add an OR condition to an X++ select statement?
1 answer
Write an answerUse ||.
CustTable custTable;
while select custTable
where custTable.CustGroup == '10'
|| custTable.CustGroup == '20'
{
info(custTable.AccountNum);
}Once you start mixing && and ||, use parentheses. It saves a lot of time later when somebody has to figure out what the query was supposed to mean.
Know the solution?
Sign in to contribute an answer and build your community reputation.
Sign in to answer