Link to home
Start Free TrialLog in
Avatar of jlingg
jlinggFlag for United States of America

asked on

Dynamics SL aged AR query

I need to develop a sql query that returns invoices that are more than 90 days overdue. I looked at the aged ar report but the query that it uses is a little confusing.  I also need to be able to export this data to excel so just exporting the aged AR report doesnt work well.  Can someone give me a query to return these invoice that can be used in SQL Server?

thanks
Avatar of James Glaubiger
James Glaubiger
Flag of United States of America image

Please post a sample output of the tables that the current report uses.  We can then build a query.  

1. Export a subset of data including column names to excel, use one sheet for each SQL table that we need to pull data from.

I can then build you a query.

Avatar of DarkAztec
DarkAztec

Hi, this is the SQL Query:

select refnbr,custid,* from ardoc where doctype='in' and duedate >= 01/01/2008

You must change the end date, in this sample this query will print all invoices that has a due date greater or equal than 01 january 2008.

ASKER CERTIFIED SOLUTION
Avatar of Philippe Boulos
Philippe Boulos
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial