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 |
Keshaba
Yak Posting Veteran
52 Posts |
Posted - 2009-08-29 : 09:25:02
|
How shall I write a sql query to retrieve the highest date in a tableI have written like this but it didn't helpselect max(appdate) from Beneficary where BID =1Keshab |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-08-29 : 11:11:29
|
you want the highest date of all records in the Beneficary table or only for BID = 1 ? KH[spoiler]Time is always against us[/spoiler] |
|
|
Keshaba
Yak Posting Veteran
52 Posts |
Posted - 2009-09-05 : 09:23:48
|
Only for BID=1Keshab |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-09-05 : 12:40:39
|
Thisselect max(appdate) from Beneficary where BID =1should work.So what is your problem?Can you make it more clear by using an example? No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-09-06 : 14:09:53
|
is appdate a datetime field? |
|
|
Keshaba
Yak Posting Veteran
52 Posts |
Posted - 2009-09-21 : 09:44:30
|
Yes appdate is a datetime fieldKeshab |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-09-21 : 11:22:39
|
quote: Originally posted by webfred Thisselect max(appdate) from Beneficary where BID =1should work.So what is your problem?Can you make it more clear by using an example? No, you're never too old to Yak'n'Roll if you're too young to die.
No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|
|
|