Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding max(date) for a given date
Message
 
 
À
16/02/2016 18:43:16
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2008 R2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01631577
Message ID:
01631581
Vues:
59
>Helo comunity
>
>I will need to find the last movement (higher) for a given date ordering by numeric code ascending to find the price field.
>Suppose that i will have 3 movement with the same date, ex. 31.07.2015 where the first numeric code is 9, the secund is 10 and finally
> the last is 25.
>I need to write
>
>Select max(datalc) from mytable where max(datalc) ="31.07.2015" order by numeric code desc
>
>How to compare max(datalc) with the given date?
>Max(datalc)=ctod('31.07.2015'), is this correct?
>
>Thanks for your Help.
>Best regards,
>Luis
select top 1 * from myTable where datalc = {^2015-07-31} order by NumericCode DESC
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform