Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Not getting all of the possible records?
Message
 
 
À
25/10/2002 17:24:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00715045
Message ID:
00715676
Vues:
10
Try this:

SELECT a.*, b.nameinfo...
FROM id a LEFT JOIN names b
ON a.id = b.id
WHERE b.id IS NULL OR b.effective_date IN
(SELECT MAX(f.effective_date) FROM names f WHERE f.id = b.id)

>I tried your solution and got back an error "SQL expression is too complex." I even simplified the query down for testing purposes:
>
>SELECT a.*, b.nameinfo...
>FROM id a LEFT JOIN names b
>ON a.id = b.id
>WHERE (b.id IS NULL OR TTOC(b.effective_date, 1) =
>(SELECT MAX(TTOC(f.effective_date, 1)) FROM names f WHERE f.id = b.id))
>
>I am not sure what is too complex for VFP ;-) This is exactly what I was looking for but I don't know why it doesn't work.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform