Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combine 2 tables - better way?
Message
De
24/02/2004 12:27:06
 
 
À
23/02/2004 18:44:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00880102
Message ID:
00880356
Vues:
30
the problem i had, described in the other message, i fixed by just opening the current table and the history table, prior to running the querry.

i think that the sql got confused, because the 2 tables have the exact same name, they are just in 2 different folders. i think that's why the result came back with 0 records (the history table is empty at this time).

by pre-opening them with different aliases the problem was solved.

Thanks Fred!


>
>SELECT hist.idfld1 FROM history\frames hist ;
>  WHERE SomeCondition ;
>  UNION ALL ;
>  SELECT cur.idfld1 FROM current\frames cur ;
>    WHERE SomeCondition AND cur.idfld1 NOT IN (SELECT idfld1 FROM history\frames WHERE Somecondition) ;
>  INTO CURSOR combined
>
>I think that should work.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform