Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for the oldest non-blank date
Message
From
19/05/2005 10:56:05
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01015389
Message ID:
01015826
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
>Hello Fabio,
>
>>A optimized version:
>
>SELECT AreaFK, StationFK, CrewFK, ;
>>	MIN(EVL(nextminor,{^9999/12/31})) AS NextMinor, ;
>>	MIN(EVL(nextmajor,{^9999/12/31})) AS NextMajor, ;
>>	.F. AS doMinGroup, .F. AS doMajGroup ;
>>	FROM premaint  GROUP BY AreaFK, StationFK, CrewFK ;
>>	INTO TABLE maintdue

>I think that you meant NVL() instead of EVL(). I tested NVL() and found that for an empty table.datefield it always returns the empty table.datefield and not the constant date supplied in the second parameter.
>

Sorry, EVL() is a VFP8 function.

<snip>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform