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
proxy issue and httpwebrequest
PHP: Get 6 most recent Youtube video links
Jquery Dialog Ajax problem
SQLCommandBuilder - GetUpdateCommand, GetInsertCommand and GetDeleteCommand Questions
Any good advanced javascript books/links to recommend?
Using ADFind to input all account in specific OU where the Accounts expire is set after the current day
The shared hand in the calendar comes back by default after a restart of outlook.
Db2 installed on Solaris box and not able to connect from db2 control center.
Windows Update site fails to load
MS SQL Server only using one core on a 4 core box