I have a transactions file, and I want to get the records for three most recent transactions. Say the file is of the form:
Document, Transaction Date, Stock Item, Status I could have multiple records with the same Document, Date and Stock Item but with a different Status. So to get the 3 most recent dates that a particular stock item was involved in, I use this: Select Top 3 distinct TransactionDate From TransactionFile Where StockItem = "X-250358" Order By TransactionDate Descending This returns 3 dates. So then I incorporate that as a subquery thus: Select * from TransactionFile where StockItem = "X-250358" And TransactionDate in ( <query above that returned 3 records> ) However this only returns records for two of the three dates that the original query returned. The records for the earliest date are missing. Any idea why ? -- Alan Bourke [EMAIL PROTECTED] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

