Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nulls from sql select
Message
 
To
24/09/1998 02:30:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00140223
Message ID:
00140363
Views:
32
>>I am doing a sql select with LEFT OUTER to a child table. If the child table does not have a record in the master table I still get the record returned (that's what I want), but the values for the fields of the child record are filled with nulls. I've tried SET NULL OFF but no luck. The problem is that I am inserting these records into another table that does not allow null values. Is there a way to do this query without returning nulls for those records?
>>
>>Thanks.
>>
>>John
>John,
>Maybe there is an easier way but this is what I would do. :
>- select nvl(child.field1,0) as fied1,nvl(child.field2,"") as field2 ...
>- or after select blank nulls
>
for ix = 1 to fcount()
>  cField = field(ix)
>  blank fields &cField for isnull(&cField)
>endfor
Cetin

Hi Cetin,

I think your second idea will work for me here. I just don't remember nulls populating fields from a select before. Is this a new feature in 5.0a? hmmm...I did just start using the new sql syntax (LEFT OUTER etc.)...Does this have anything to do with the returned nulls?

Thanks for your help!

John.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform