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)