Indexing on table from AOT

Hi guys,

Is it possible to create a non-unique or unique index on a table field from AOT, explicitly with DESC order?


I guess what you need is not with Index. If you want to have order by, try to create a query, there you can indicate the order by, then put the query under a view, so that you can use the view in code.

Can you elaborate your requirement or give a reason for doing so? .Its not clear, why you want to provision sorting while creating index?

You definitely can create " non-unique or unique index on a table field from AOT". It’s not needed to create it descending (DESC), because ascending or descending simply means reading the index either from the beginning or the end.

Thanks, Kwen. Your replay is of practical significance. I was asking this question just from the curiosity that ORDER BY is ASC default. So what is the default sequence for an index if we used it in the SELECT statements?

Thank you, Martin,
In SQL Server, you can define an index with explicitly DESC or ASC option, for example one column ASC, another column DESC. I am wondering if we can do it in AX?

Thanks for replying, Amit,
Currently I don’t have a specific requirement. I was asking just when comparing SQL index to AX indexing.