November 2010
M T W T F S S
« Oct   Dec »
1234567
891011121314
15161718192021
22232425262728
2930  
Archives

SQL Script for Last Cost Price of Items

Hi all

I recently noted a community question for identifying the last cost price of items, purchased from various vendors, in Dynamics GP.

/*******************************************************************
Created on Nov 23, 2010 by Sivakumar Venkataraman
For updates see http://msdynamicstips.com/
This query provides the last purchase cost of various items
and the vendor combination that have been processed in Dynamics GP. 
 
The Last_Originating_Cost is the cost price of the last 
purchase made for that item from the specific vendor. 
The Last_Currency_ID is the currency ID for the last purchase made
for that item from the specific vendor.
*******************************************************************/
SELECT  A.VENDORID,
        B.ITEMDESC,
        A.VENDORID,
        C.VENDNAME,
        A.VNDITNUM,
        A.VNDITDSC,
        A.Last_Currency_ID,
        A.Last_Originating_Cost
FROM    dbo.IV00103 A
        INNER JOIN IV00101 B ON A.ITEMNMBR = B.ITEMNMBR
        INNER JOIN dbo.PM00200 C ON A.VENDORID = C.VENDORID

Hope this helps…

Until next post…

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)