The latest example uses SQL queries materials purchase price

This example can look up material from a SQL Server database in the latest purchase date of the minimum purchase price, that is, if the same material there are multiple procurement records, first of all take the maximum purchase date, if the same purchase date there are still many records, take the purchase price of the lowest of. (By Order By adjusting the other requirements can be achieved, for example, take the earliest recorded date or maximum purchase price)

sql-query-latest-purchase-price

 

Guess you like

Origin www.cnblogs.com/lydg/p/11468720.html
Recommended