vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, I'm looking for the mysql equivalent to oracle Greater function. In fact, I want to order by the greater of two timestamp fields order by greater(last_conneciton_date, insert_date) Anybody knows the way to do it in Mysql ? Thanks in advance ------------------- Amor o Pareja http://www.amoropareja.com |
| |||
| aa2788@amoropareja.com wrote: > Hi all, > > I'm looking for the mysql equivalent to oracle Greater function. In > fact, I want to order by the greater of two timestamp fields > > order by greater(last_conneciton_date, insert_date) > > Anybody knows the way to do it in Mysql ? > GREATEST() - and it's opposite LEAST().. Cheers, Mark -- Mark Leith, Senior Support Engineer MySQL AB, Worcester, England, www.mysql.com Are you MySQL certified? www.mysql.com/certification |
| ||||
| You can use IF function ... */IF(last_conneciton_date> insert_date,last_conneciton_date, insert_date)/* --Yoge aa2788@amoropareja.com wrote: > Hi all, > > I'm looking for the mysql equivalent to oracle Greater function. In > fact, I want to order by the greater of two timestamp fields > > order by greater(last_conneciton_date, insert_date) > > Anybody knows the way to do it in Mysql ? > > Thanks in advance > ------------------- > Amor o Pareja > http://www.amoropareja.com > > > -- Yoge, AdventNet, Inc. 925-965-6528 yogendrav@adventnet.com site24x7.com |