Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Include del recs in 1st tbl but exclude del recs in join
Message
 
 
À
26/03/2002 17:34:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00637576
Message ID:
00637580
Vues:
21
This message has been marked as the solution to the initial question of the thread.
You can do it in two steps
set deleted off
select last, tbl1.id from tbl1 ;
  INTO CURSOR crsTbl1
SET DELETE ON
select last, tbl1.id, descr from crsTbl1 ;
left join tbl2 on crsTbl1.id = tbl2.id
>I have 2 table, joins on id number. How do I get a result set that includes deleted records in the primary table, but exclude deleted records in the join table?
>
>set deleted off
>select last,tbl1.id,descr from tbl1 ;
>left join tbl2 on tbl1.id=tbl2.id
>
>The above will give me:
>lastname1, id1, descr1
>lastname1, id1, descr2
>where in tbl2, I have these records:
>id1,descr1 (deleted record)
>id2,descr2
>
>What I need is:
>lastname1, id1, descr1
>
>How can I accomplish that?
>THANKS ALL!
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform