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 |
Girlnet
Yak Posting Veteran
77 Posts |
Posted - 2009-10-21 : 16:58:52
|
How would I get the max date with time?Select QAD_rqda_det.rqda_nbr, MAX(DATEADD(s, dbo.QAD_rqda_det.rqda_time, dbo.QAD_rqda_det.rqda_date))from QAD_rpda_detGroup by QAD_rqda_det.rqda_nbrProduces 3 rows10/21/2009 6:20:00 AM10/21/2009 9:01:00 AM <---------- Only want this one!10/21/2009 7:19:00 AMThis will give me the last time the req was updated.Thanks very much! |
|
X002548
Not Just a Number
15586 Posts |
|
cjonline
Yak Posting Veteran
55 Posts |
Posted - 2009-10-26 : 10:49:34
|
could try a select top 1 |
|
|
Girlnet
Yak Posting Veteran
77 Posts |
Posted - 2009-10-26 : 11:05:55
|
Thanks guys - It was actually my stupidity. It was my join causing the problem not the statement. |
|
|
|
|
|