General information
Category:
Coding, syntax & commands
>>>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only