Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add a column placeholder allow NULL
Message
 
 
To
16/07/2012 06:35:35
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01536981
Message ID:
01548644
Views:
64
>>>What is wrong with CAST(null as int)? Why the Coalesce is necessary?
>>
>>Because he wanted to get 0 as the field's value, I assume.
>
>CAST() set the field nullable.
>
>select CAST(0 as int) as NewColumn
>into #NewTable
>
>insert into #NewTable values (null)
>select * from #NewTable 
>
No, CAST alone does not work when I need to select from another table, e.g.

select CAST(cost as money) as cost
into #newtable
from myOtherTable

does not work.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform