Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NULL Values from Outer Joins
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00474253
Message ID:
00474265
Vues:
34
>>Is there anyway to prevent ".null." from populating a field when an outer
>>join is done and no match is found in the child table? I already have SET
>>NULL OFF.
>
>Garrett Fitzgerald pointed out a Knowledge Base article on this topic just
>last week. Take a look at http://support.microsoft.com/support/kb/articles/q268/9/06.asp

Rick, that's a different issue. In fact, that article I pointed out will put .NULL.s in the join. :-)

Michael, there are at least two ways to do this. If you aren't worried about the .NULL. values, but don't want them cluttering your display, you can use the SET NULLDISPLAY command to set the .NULL.s to a blank string, or something similar.

If you don't want the .NULL.s in the SELECT at all, you can do something like:
SELECT t1.field, NVL(t2.field, SPACE(10)) ;
   FROM t1
      LEFT JOIN t2 ON t1.pk = t2.fk
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform