Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Nulls into cursors
Message
De
01/09/2010 10:03:40
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01479558
Message ID:
01479565
Vues:
54
Naomi --

Thanks for your help ...

Note that my second question was 'Can somebody specify the ALTER statement ... bla bla'. In your response, it appears that such is possible, but you don't bother to say how to do it.



>>I have a cursor created from a SELECT statement in which I would like to insert some nulls.
>>
>>The cursor is created by something that looks like:
Select partno,;
>>      sum(Value1) as Field1,;
>>      sum(Value2) as Field2,
>>      into curosr SomeCursor ReadWrite
>>
>>So, two questions:
>>(1) Can I specify (somehow) in the SELECT that I want the result field to allow nulls (even though the SELECT statement itself will not create any nulls)
>>
>>or (2) Can somebody specify the ALTER statement that will let me modify the cursor so that it will accepts nulls.
>>
>>Thanks,
>>
>>(More confused than normal in Newbury Park)
>
>Yes, you can do both.
>
>You can also use
CAST(sum(Value) as I Null) as Field1,
-- if you want to get integer field, you can use any other numeric type here
>
>Take a look at CAST() function in Help.
>
>BTW, in your original statement the GROUP BY is missing.
Jim Nelson
Newbury Park, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform