By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,915 Members | 1,337 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,915 IT Pros & Developers. It's quick & easy.

getting the most latest date

P: n/a
I have a column which stores dates (datetime data type). I would like
to fetch one data which is the most latest date among them. So if there
are 04/01/06, 05/08/06, 05/12/06, 06/15/06, then 06/15/06 is the one I
need to output.

how can I write this in sql stmt?
select datebegin
from testtable
where datebegin = ?????

I don't think it is simple as I thought. I have no idea what I need to
write in where clause to make this work.
thanks.

Jun 14 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
select MAX(datebegin) from testtable

TGEAR wrote:
I have a column which stores dates (datetime data type). I would like
to fetch one data which is the most latest date among them. So if there
are 04/01/06, 05/08/06, 05/12/06, 06/15/06, then 06/15/06 is the one I
need to output.

how can I write this in sql stmt?
select datebegin
from testtable
where datebegin = ?????

I don't think it is simple as I thought. I have no idea what I need to
write in where clause to make this work.
thanks.


Jun 14 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.