Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query for Joining tables
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01400672
Message ID:
01400717
Vues:
34
This message has been marked as a message which has helped to the initial question of the thread.
>I could not get it to work. But thanks for the message.

Try this instead
CREATE CURSOR Tbl1 (fldID int, fld2 C(10))
INSERT INTO tbl1 VALUES (1,'')

INSERT INTO tbl1 values (2, 'B') 
INSERT INTO tbl1 VALUES (3, 'C') 

CREATE CURSOR Tbl2 (fldID int, fld2 C(10))
INSERT INTO tbl2 SELECT 1,'' FROM tbl1 ;
union SELECT 2, 'BB' FROM tbl1 ;
union SELECT 3, '' FROM tbl1 ;
union SELECT 4,'DD' FROM tbl1


select FldID, Fld2 from Tbl2 where exists ;
 (select 1 from Tbl1 where Fld2 = space(10) and FldID = Tbl2.FldID) OR Fld2<>SPACE(10) ;
UNION ;
select FldID, Fld2 from Tbl1 where exists (select 1 from Tbl2 where Fld2 = space(10) and FldID = Tbl1.FldID)
Sorry for taking so long, worked on the other thing in the moment.
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform