Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Please no Null in my select SQL result...
Message
From
23/07/2001 18:28:50
 
 
To
23/07/2001 18:00:34
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00534045
Message ID:
00534150
Views:
13
>>I am transfering data from Access to VFP with ODBC.
>>
>>It woking find using remote view but some field that I transfer have Null value.
>>Is there a way prevent having Null in my Select SQL Result?
>
>A small addition to Steve and Hector's responses...
>
>You'll want to insert, if null, a value equal to the length of the field.
>
>VFP SQL Select bases the field size of the resulting cursor on the lengths of the first record. If it happens to be a length less than the field length, you'll end up with a truncated value.
>
> Jay

Jay,

Ah, yes, good point. So, if the field is 30 characters wide, for example, he needs to:
select NVL(custName, space(30)) as cCustName, ....
Thanks for catching that, that would have bitten him at some time down the road :)
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform