| Conditional Selection of a Field [message #578347] |
Wed, 27 February 2013 03:44  |
 |
supraj
Messages: 2 Registered: February 2013
|
Junior Member |
|
|
I'd like to select one of two fields from a table, based on which of them is greater for that row.
eg. For every row in JOINING_TBL, I'd like to select either JOINING_DATE or REJOINING_DATE, whichever is greater. I do dream about being able to use a Java-like ternary operator in here, something like this:-
SELECT (JOINING_DATE>REJOINING_DATE?JOINING_DATE:REJOINING_DATE) FROM JOINING_TBL
However, I understand(through other fora) that this can't be used in here. Could someone help me with approaching this scenario? I'm relatively new to this, so please pardon my ignorance in the issue.
|
|
|
|
|
|
|
|
|
|