Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacing Null Fields
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01467343
Message ID:
01467347
Views:
58
>>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
>
>You could do this in your select:
>
>SELECT MainTable.SomeField,;
>       NVL(LeftJoinedTable.NumericField, 0000000.00) AS NumericField,;
>       NVL(LeftJoinedTable.CharField, SPACE(??))            AS CharField;
>FROM ....
>
Or use CAST instead.

select cast(NVL(LeftTable, charfield,'') as C(100)) as CharField.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform