Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here
DynDeveloper.com

DynDeveloper.com

Table Edits Forum Articles
Table Edits 0 Table Edits 0 Table Edits 0
Sign Up Now!Log In
kkoehle@valuedrugco.com 11/7/2018 1:41:19 PM

Finding the most recent date

Need some SQL help here....

I have a table with the following columns: 

ItemNumber,   BinLocation, TransactionDateandTime

There are multiple entries in this table, based on what happens with Inventory.

Example:

Item         Bin          Date and Time stamp

123456    LOC A     2018-10-01 07:23:13.397

123456    LOC B     2018-11-06  10:19:01.540

123456    LOC C    2018-10-30  08:22:00.770

111222    LOC O   2018-11-07  06:54:45.373

111222    LOC P   2018-11-03   06:12:59.067

 

 

I want the record for each item with the most recent date to be extracted into another table I'm using for a Smartlist.

Desired result:

123456    LOC B     2018-11-06  10:19:01.540

111222    LOC O    2018-11-07  06:54:45.373

 

 

Version: GP 2015
Section: SQL Scripts








Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables