🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.database.win32
1 messages
1 total messages Started by Michael Thu, 05 Jun 2008 05:03
HELP : Query - How to get certain record ( last two date )
#8
Author: Michael
Date: Thu, 05 Jun 2008 05:03
34 lines
1911 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads