Tuesday, August 7, 2007

Order by clause before Where Clause (Dynamics AX Select)

People who are aware of SQL must know that Order by clause is always written after where clause in SQL Selects.

In X++ this is different. Order by is always written before where clause.

The example code is as below.

select firstonly BookId from assetBook order by BookId desc where assetBook.AssetId == this.AssetId

Cheers.
Shujaat.

1 comment:

Anonymous said...

Nice, i was thinking like SQL :P
TYVM