Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to solve this SQL Select?
Message
 
 
À
27/02/2006 15:47:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01099608
Message ID:
01099654
Vues:
13
>Becuase I hate to see in my code:
>NVL(Field,0000000.00) AS ...
>I use new VFP9 function CAST. No the answer is in how join these tables. I used left join, you only JOIN
>That way I get in the result cursor (w/o gouping)
>
>ID   Tbl2.PK  Tbl2.Sumv  Tbl3.PK    Tbl3.Sumv
>1       1       200        2           200
>1       NULL    NULL       3           400
>
>

This is where I see different results, not in your example, but my actual code with my tables. When I use LEFT JOIN I see no NULL values in the resulting query. That's what puzzles me. Table2 has only 1 record matching the PK field. Therefore, it should have NULL values in the second record but it doesn't.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform