SQL View to return most recent five purchase orders by vendor

Microsoft Dynamics GPI don’t recall when I wrote this SQL view, but I stumbled across it when I was looking for something else and thought it worth posting.

It uses a common table expression to return the most recent five purchase orders for each vendor.

-- drop view if it exists
IF OBJECT_ID(N'uv_AZRCRV_MostRecentFivePurchaseOrdersByVendor ', N'V') IS NOT NULL
    DROP VIEW...

Continue Reading Ian Grieve’s Article on their blog

SQL View to return most recent five purchase orders by vendor

I don’t recall when I wrote this SQL view, but I stumbled across it when I was looking for something else and thought it worth posting. It uses a common table expression to return the most recent five purchase orders for each vendor.

Blog Syndicated with Ian Grieve’s Permission

Author: Ian Grieve

Share This Post On
Share via
Copy link
Powered by Social Snap