Hi All,
I want to write sql select … in equivalent axapta like that:
select CustTable Where CustTable.CustGroup in (“CST”,“AVM”,“BYZ”)
How can I write that in Axapta except using or clause with three ==.
Hi All,
I want to write sql select … in equivalent axapta like that:
select CustTable Where CustTable.CustGroup in (“CST”,“AVM”,“BYZ”)
How can I write that in Axapta except using or clause with three ==.
Use II (or) condition
while select custTable
where (custTable.custGroup == ‘CST’ || custTable.custGroup == ‘AVM’ || custTable.custGroup == ‘BYZ’)
{}
I just said “How can I write that in Axapta except using or clause with three ==.” [;)]
AX does not support operator IN, so you’ll really end with a query like this. But you can get more flexibility if you use the Query framework - then you can iterate through a collection of values add ranges individually for each value.
If you use AX2012, you can also fill values to a temporary table in database (TempDB) and use normal join. Definitely use this approach if you have lots of values.
That was missed
you can use ‘like’ keyword also but OR need to be used as well
while select custTable
where custTable.CustGroup like ‘20’ ||
custTable.CustGroup like ‘30’
{}
When they throwed away Oracle at Axapta 2012, I thought (In fact I’m not sure if Oracle supports in) I thought they made that decision just support more MS-SQL commands but it seem decision just about marketing…