Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shaik.zakeer
Posting Yak Master
117 Posts |
Posted - 2008-04-24 : 09:03:50
|
| Hi i have a tablebank cr dr datetimeicici 10000 --- 1/1/2007 -- 1 transactionhdfc 5000 ------- 1/1/2007icici --- 8000 1/1/2007 --- 2 transactionhdfc ---- 2000 1/1/2007how can i get the last transaction in a perticular date in all d banksThanks |
|
|
PeterNeo
Constraint Violating Yak Guru
357 Posts |
Posted - 2008-04-24 : 09:09:45
|
| hi,if u r datetime field contains time part also then u can simply usemax(datetime)other wise useROW_number () over(partition by bank, datetime order by bank) some thing like that |
 |
|
|
|
|
|