Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keeping NULL out of a view
Message
From
17/09/1997 10:51:40
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
To
17/09/1997 09:42:25
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00049897
Message ID:
00050393
Views:
31
>>>>Try...
>>>>SET NULLDISPLAY TO ""
>>>>//:^)
>>>>>Hi Elyse!
>>>>>
>>>>>select *, iif(isnull(yourstr),'',yourstr)
>>>>> from ....
>>>>>into ffff
>>>>>
>>>>>>Is there any way to prevent NULL values in a local view? I need the
>>>>>>character fields to have empty strings if they are empty.
>>>>>>
>>>>>>Thanks
>>>>>>Elyse
>>>
>>>NULLDISPLAY works for how it appears, but it doesn't change the type of data. I need to string the values of the fields together and come up with a valid character string.
>>>
>>>Elyse
>>How about setting the "Allow Nulls" setting off on the table definition screen for the database. This way you should not get any null values in the tables in the first place.
>
>All of my tables do not allow Nulls but apparently that doesn't keep them out of SQL's.
>
>Elyse


If your data for the view is derived from VFP dbf tables then you can add a function to your view like
NVL(fieldname, '') as fieldname. If your data comes from SQL Server then you will likely have to use a SQL Server function to convert the data. This is not recommended if you intend to update the data because expression columns are not updateable.
Previous
Reply
Map
View

Click here to load this message in the networking platform