Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.NULL. Returned want Blank or 0
Message
De
23/08/2000 15:56:28
 
 
À
23/08/2000 15:51:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00408441
Message ID:
00408459
Vues:
13
Trey,

Thanks for the additional info. That saved me some hair ripping down the road for sure :o)

THanks

>>I am selecting two records from two tables the second table may not have the matching record yet. I get a ".NULL." back from the select.
>>Is there a way to get a 0 (zero) or a blank if there is no match from the LEFT OUTER JOIN? I know that I can ASCAN() the array I was wondering if I can do this in the SELECT???
>>
>>
>>SELECT Crafts.crafttitle, Craftpay.payrate;
>> FROM  jobtrack!Crafts;
>> LEFT OUTER JOIN jobtrack!CraftPay;
>>   ON  Crafts.craftid = Craftpay.craftid;
>> INTO ARRAY laData
>>
Use NVL() on the fields in the field list.
>
>You will probably need to use SPACE(field_width) with width of the character field and the full width of the numeric field to make sure you get the full width of each field, in case the first record returned has NULL(s)
>
>e.g., assuming crafttitle is c(10) and payrate is n(10,2)
>
>SELECT NVL(Crafts.crafttitle,SPACE(10)) AS crafttitle, ;
>NVL(Craftpay.payrate,0000000.00) AS payrate...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform