Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GREATEST() function for dates.
Message
 
 
To
30/08/2005 13:13:57
General information
Forum:
Oracle
Category:
Packages
Miscellaneous
Thread ID:
01045227
Message ID:
01045272
Views:
24
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform