MySQL Forums
Forum List  »  Newbie

Re: Select where a date column is closest to NOW()
Posted by: David Wynter
Date: August 22, 2005 11:35AM

This worked

SELECT ci.INT_EFF_DT FROM coupon_information ci
WHERE NOW() > ci.INT_EFF_DT
GROUP BY ASSET_ID
HAVING ci.INT_EFF_DT = MAX(ci.INT_EFF_DT)
ORDER BY ASSET_ID

David

Options: ReplyQuote


Subject
Written By
Posted
Re: Select where a date column is closest to NOW()
August 22, 2005 11:35AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.