Solving microsoft dynamics AX select statement in 2012

Hi Guys ,

I have a problem with SQL statements in ax. Is there any alternate way to do this?

Select all customers who don’t have a salesorder

Select all customers who have more than 10 salesorders (Two Query)

Select all customers who have a salesorder between a given period(Choose the period based on your local system data)

Select the item that has the largest number of Sales lines (Use:count)

Select the item that has the largest number of Sales lines in a given period of time (Use:count)

Select all salesline that has a inventory transaction with status(Reserved Physical, Reserve ordered, Ordered)

Select all salesorder who has atleast one salesline that has a inventory transaction with status(Reserved Physical, Reserve ordered, Ordered)

(Hint: Multiple level Select statment:3levels)

Select all items in saleslines that has a configuration(inventory dimension) specified in transactions (Multilevel: 3 levels)

Select all items who don’t have transactions (Use inventtable, inventtransactions)

Select all items who’s inventory model group is negative inventory flag checked and has a inventory dimension group with the flag inventColourId Yes

(Hint: Multiple Joins)

Select the most recent sales order

Select the customer who has the latest sales order

Select the customer who has the oldest sales order

Give a list of items and the total quantity across all saleslines

Write a statement to delete all sales order that are open and don’t have a salesline

Write a statement to bulk delete all sales order that are open and don’t have a salesline (Use delete_recordset)

Hi jaxdax,

welcome to DUG. Please be sure that you’re asking in the right forum (I moved your question to the Developer forum). Also please always add appropriate tags, such as keywords and version of AX.

Back to your question: Please read Select Statement Syntax [AX 2012] first. If there is still something unclear, please ask specific questions.

This is the right place to ask if there is something you don’t understand, it’s not the right place if to throw a list of requirements and expect that somebody will do your whole work for you (and for free).