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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sql query to retrieve the highest date

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 table

I have written like this but it didn't help
select max(appdate) from Beneficary where BID =1

Keshab

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]

Go to Top of Page

Keshaba
Yak Posting Veteran

52 Posts

Posted - 2009-09-05 : 09:23:48
Only for BID=1

Keshab
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-05 : 12:40:39
This
select max(appdate) from Beneficary where BID =1
should 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.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-09-06 : 14:09:53
is appdate a datetime field?
Go to Top of Page

Keshaba
Yak Posting Veteran

52 Posts

Posted - 2009-09-21 : 09:44:30
Yes appdate is a datetime field

Keshab
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-21 : 11:22:39
quote:
Originally posted by webfred

This
select max(appdate) from Beneficary where BID =1
should 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.
Go to Top of Page
   

- Advertisement -