Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Question
Message
De
07/12/1998 11:52:29
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00164809
Message ID:
00164815
Vues:
28
Hi Mark ---

Welcome to the Universal Thread! As to your query problem, this may help:
SELECT MAX(IIF(date1>date2,date1,date2)) AS maxdate ;
   FROM table



>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!
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform