Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keeping NULL out of a view
Message
De
17/09/1997 10:51:40
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
17/09/1997 09:42:25
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00049897
Message ID:
00050393
Vues:
36
>>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform