Microsoft
Software
Hardware
Network
Question : MsAccess Query
Hi guys
I have a large Access table that contains sales history
This SalesHistory Table contains 3 columns (see sample below)
CUST_NO ITEM_NO OrderDate
13909 6271398 4/16/2008
13909 6271398 12/31/2008
13909 6271398 6/3/2009
13909 6271398 8/26/2009 ***
14012 8891070 7/29/2008
14012 8891070 9/9/2008
14012 8891070 11/13/2008 ***
14012 8891084 7/29/2008
14012 8891084 9/9/2008
14012 8891084 11/13/2008 ***
14071 8671315 11/6/2009
14071 8671315 6/3/2010 ***
14071 8671382 8/17/2007
14071 8671382 6/3/2008 ***
All records in above table contains disticnt 3 columns
I am trying to write a sql query will create a new table with the same structure
and includes only records of the last sale of each inventory item
That is the new table will contain only the six records with asterisks
Thank you
Dory
Answer : MsAccess Query
To create a new table:
Select
CUST_NO,
ITEM_NO,
Max(OrderDate) As OrderDateLatest
Into
tblYourNewTable
From
tblYourTable
Group By
CUST_NO,
ITEM_NO;
/gustav
Random Solutions
Function in excel
Columns cannot convert between unicode and non-unicode string data types.
SSIS and variable issues
Physical installation of the Exchange 2007
BESX 5.0.1.4 and Exchange 2010 Users can't activate enterprise email
How to burn multiple copies with roxio creator
IIS Web site works in all browsers except Safari on Mac
how to implement virtual mode in the DataGridView control?
publishing websites in TMG 2010
VB.NET Setup Installing App Files Without Asking What Folder to Install