Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Question
Message
De
07/12/1998 11:54:21
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00164809
Message ID:
00164816
Vues:
20
>I just found this thread site, it looks great. I'm new to database programming and Foxpro, so please forgive my beginner questions...
>
>I need to do a SELECT statement that returns the greater (most recent?) of two dates, which are in two separate fields (like date1 and date2). I'm not sure how to do that in SQL so that the results contain just one of the two dates, like:
>
>Account
>.
>.
>.
>Result Date
>
>By the way, I get the feeling that I would benefit greatly from a good SQL book. Anyone have any suggestions? It would be great of course if it were related to Foxpro.
>
>Thanks!

I believe this should fit the bill:

SELECT IIF(Date1 > Date2, Date1, Date2) AS ResultDate...

HTH
Paul M.
MCSE/MCSA/MCT/MCP+I, A+, Network+, I-Net+
Nil carborundum illegitimi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform