Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get a record with the latest Date
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00448872
Message ID:
00448912
Vues:
14
>In SQL Server, What would be my Statement to retreive a record with the latest date ?
>
>Someting Like This : Select * From MyTable Where Product = ?Parm1 And ???ChangedDate Is The Latest ???

Off the top of my head, without testing:
SELECT * 
   FROM myTable t1
   WHERE product = ?cParm1
   AND changedDate = 
      (SELECT product, MAX(changedDate)
          FROM myTable t2
          WHERE t1.product = t2.product
          GROUP BY product)
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform