
March 17th, 2012, 02:20 PM
|
|
Registered User
|
|
Join Date: Mar 2012
Posts: 2
Time spent in forums: 33 m 29 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by Biznez hello everyone, im trying to get the earliest record. data is below
note_id/ doc_received_date/ bankruptcy_date/ sp_recorded_date
2332/ 20090106<----/ 20081219/ 20090106
2332/ 20090323/ 20081219/ 20090323
2332/ 20090413/ 20081219/ 20090413
2332/ 20090507/ 20081219/ 20090507
because the bankruptcy_date date are all equal i would need to pull one record with the earliest date from the doc_received_date. The date with the arrow is the record i want. So basically i would like to show this result
note_id/ doc_received_date/ bankruptcy_date/ sp_recorded_date
2332 20090106 20081219 20090106
Hope this made sense.. Thanks for you ur help |
Hello,
how about something like SELECT TOP 1 * FROM [tableName] ORDER BY doc_received_date DESC
|