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
Can't boot SBS 2008 Standard - CRCDISK.SYS
Cisco Unity Express to Trigger MWI on overlay DN
Exhange 2003 mailbox permissions
alter does it drop
User profile service in Sharepoint 2010
Meetings reschuled are still showing old meeting date and time
How to stablish a proper setup in MS Outlook 2003 encrypting mails
how can i change any image resolution online and then save it in to local pc ??
Asp.Net MVC PartialView doesn't Refresh after Ajax postback
Combine worksheets from different workbooks into one workbook using VB.Net