Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Null values in cursor
Message
 
 
À
26/04/2007 08:40:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01220061
Message ID:
01220455
Vues:
16
Pre VFP9 solution would be:
create cursorTemplate (IDField I, MyMemo M, MyNULL c(10) NULL, etc.)
append blank
select * from cursorTemplate where 1=0 ;
union ;
select ... from real tables
>I am still using VFP 6, unfortunately.
>
>>Try
SELECT SomeField, CAST (MyFunc (OtherField) AS N (10, 2)) AS CalculatedValue;
>>   FROM MyTable;
>>   INTO CURSOR Temp
>>
HTH
>>
>>>In a query similar to:
>>>
>>>
>>>select SomeField, MyFunc(OtherField) as CalculatedValue;
>>>  from MyTable;
>>>  into cursor Temp
>>>
>>>
>>>it may happen that MyFunc() returns .NULL. for some cases. If this happens, VFP informs me that the column doesn't accept NULL values.
>>>
>>>How do I make VFP allow null values? Of course, I could use NVL(...), but I do want NULL values in some cases, in order to know that there is some missing data.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform