web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Dynamics GP -- SQL Query from SmartList

(1) ShareShare
ReportReport
Posted on by 3,201
Hi:
 
Is there a document outlining the SQL queries that make up SmartLists?
 
I found a perfect SmartList report that shows only open purchase orders.
 
I can almost replicate this in a SQL query, except for one thing.  I can't get the Quantity Shipped field from POP10500, for me to compare with the Quantity Ordered field from POP10110.
 
There's a SmartList that has both of these columns combined into one report.  That's why I need its SQL query.
 
Below is my query.  If nothing else, can someone please tell me how to modify this query to capture the Quantity Shipped field for open purchase orders in POP10500?
 
Thanks!
 
John
 
select POP10110.PONUMBER, POP10110.VENDORID, POP10100.VENDNAME,
POP10100.CONTACT, POP10100.ADDRESS1, POP10100.ADDRESS2, POP10100.CITY, POP10100.STATE, POP10100.ZIPCODE, POP10100.PHONE1,
POP10100.PYMTRMID,
POP10110.ITEMNMBR, POP10110.ITEMDESC, POP10110.UOFM, POP10110.QTYORDER,
POP10110.UNITCOST, POP10110.EXTDCOST,
POP10110.REQDATE, POP10110.PRMDATE, POP10110.PRMSHPDTE, POP10110.SHIPMTHD--, POP10500.QTYSHPPD
 from POP10110
INNER JOIN POP10100 ON
POP10110.PONUMBER = POP10100.PONUMBER AND POP10110.VENDORID = POP10100.VENDORID
--LEFT OUTER JOIN POP10500 ON
--POP10110.PONUMBER = POP10500.PONUMBER
where POP10100.POTYPE = '1' AND
POP10110.POLNESTA = '2' and POP10110.LOCNCODE = 'CVWH' and POP10110.VENDORID <> 'SHURPAC' --AND POP10500.QTYSHPPD <> 0
ORDER BY POP10100.PONUMBER
 
Categories:
I have the same question (0)
  • Verified answer
    Lisa at AonC.com Profile Picture
    923 Super User 2025 Season 2 on at
    In general, there is a SQL View for each of the standard SmartList yellow folders.  The View name is the same name as the yellow folder, excluding spaces.  For example, Purchase Line Items SmartList (where I am guessing you are seeing an "Open Purchase Orders" saved favorite, is based on a view named PurchaseLineItems.

    You can join on other views/tables.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans