Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replacing Null Fields
Message
De
04/06/2010 12:02:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01467343
Message ID:
01467348
Vues:
71
>If I do a select Left Outer join, I end up with Nulls in the fields where no match exists in the Joined Table.
>Is there any VFP setting where I can default these to zero (if numeric) or spaces(if Character) rather then Null.
>I know I can post process the table and do an if Isnull() , but my prererence is to avoid having to do this if it can be done.
>Thanks in advance
>
>Gerard

use nvl()
select ...
     nvl(FieldName, space(20)) as FieldName


select ...
     nvl(FieldName,  cast('' as M)) as FieldName


select ...
     nvl(FieldName,  cast(0 as int)) as FieldName
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform