SQL Query [message #347690] |
Fri, 12 September 2008 18:25  |
mrpranab
Messages: 32 Registered: March 2005
|
Member |
|
|
Hello,
I have attached a text file having my sql query. This query returns duplicate records. So i need to include 3 more conditions in the this query. Can you tell me how can i apply below conditions in my query:
Conditions are
1. if bk.date_filed and bk.bnkr_type_id same in the records then pick up only one record.
2. if bk.date_filed same in the records but bk.bnkr_type_id different then pick up max(bk.bnkr_type_id) record only.
3. if bk.date_filed different then pick up latest date record only.
where fortracs.bankruptcy bk
I need to do in SQL. Pls let me know if you need any other informations.
Thanks.
-
Attachment: query.txt
(Size: 8.62KB, Downloaded 578 times)
|
|
|
|