Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP : Query - How to get certain record ( last two date )

2 views
Skip to first unread message

Michael

unread,
Jun 5, 2008, 1:03:00 AM6/5/08
to
Dear All,

I have a problem in designing query - to get list of customer price records
( last two date )

Here is sample table

Customer | Product Code | Price | Last Update

A | ItemA | 10,000 | 10/1/2007
A | ItemA | 11,000 | 10/6/2007
A | ItemA | 12,000 | 12/12/2007
A | ItemB | 10,000 | 11/1/2006
A | ItemB | 15,000 | 01/6/2006
A | ItemB | 12,000 | 01/8/2008


I Would like to get only two most current date for each item pricing

Result Expected :

Customer | Product Code | Price | Last Update

A | ItemA | 11,000 | 10/6/2007
A | ItemA | 12,000 | 12/12/2007
A | ItemB | 15,000 | 01/6/2006
A | ItemB | 12,000 | 01/8/2008

Anyone ?

Thanks

Regards
Michael

Michael

unread,
Jun 5, 2008, 1:01:21 AM6/5/08
to
0 new messages