Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select records with Maximum date group by address
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00705983
Message ID:
00706010
Vues:
28
Update By the way, we've been in production for several months already and we discovered this problem just few days ago! Our customers received incorrect data due to the wrongly written SQL statement...

>Hi Nadya,
>
>I would try.
select upper(CCODE+TOWN+STREET+str(STNUM,4)+STNUMEXT+UNIT) ;
>       as Address, * from (m.tcTableName) ;
>	WHERE  upper(CCODE+TOWN+STREET+str(STNUM,4)+STNUMEXT+UNIT) + DTOS(date) in ( ;
>       		SELECT Address + DTOS(maxdate) FROM curTemp)
>
I think, now you can combine two queries in one this way.
>

He-he, that's another variation, which I just wrote too. However, I don't think, it could be re-written as a single query. At least, I don't see it. Fortunately, in my case I can use two queries...

Both queries return identical results (inner join variation and sub-query variation), I think, sub-query is faster...
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