Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nulls into cursors
Message
From
01/09/2010 10:03:40
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01479558
Message ID:
01479565
Views:
53
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform