Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GREATEST() function for dates.
Message
 
 
À
30/08/2005 13:13:57
Information générale
Forum:
Oracle
Catégorie:
Paquets
Divers
Thread ID:
01045227
Message ID:
01045272
Vues:
21
This message has been marked as the solution to the initial question of the thread.
You have the correct function and its use. What kind of error message do you get? Have you declared all your variables, including ldNewTtlDt, as date data types?

Update: Looks like you have to use this as a SQL function for it to work --

SELECT GREATEST(ldRfHrsDt, ldRfPartDt, ldRfMroDt, ldRfExpDt, ldRfShipDt) INTO ldNewTtlDt from dual;

>Hi All,
>
>In the body of a package I populate 5 variables with date values. I need to know which of these dates is the most recent. But I am unable to find the correct function for this. I tried:
>
ldNewTtlDt := GREATEST(ldRfHrsDt, ldRfPartDt, ldRfMroDt, ldRfExpDt, ldRfShipDt);
>But this didn't seem to work. I need to take the correct date and use in in my update statement.
>
>Could someone please tell me the correct function.
>
>TIA
>Mike
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform