Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Null Value error while updating table
Message
From
19/10/2012 17:05:22
 
 
To
19/10/2012 15:34:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01554883
Message ID:
01555378
Views:
50
>>>>>Hi,
>>>>>
>>>>>trying to update table using UPDATE-SQL and keep getting an error, that field "grno" doe snot accept NULL value.
>>>>>First of all, it happens only when I run EXE, never in APP. and second, I am using NVL function to prevent any NULLs.
>>>>>
>>>>>Please see the simple code below:
>>>>>UPDATE PS1;
>>>>> SET PS1.grno=NVL(ID.grno,SPACE(6)) ;
>>>>> FROM PS1 ;
>>>>> LEFT OUTER JOIN ID1 ON UPPER(PS1.employeeid)=UPPER(ID1.employeeid)
>>>>>
>>>>>I tried to use INNER JOIN, but received the same error message.
>>>>>
>>>>>And by the way, I modified the table PS1 to allow NULL value in the field "grno".
>>>>>
>>>>>Any ideas?
>>>>>
>>>>>Thanks
>>>>>Jerry
>>>>>
>>>>
>>>>try
>>>>
>>>>UPDATE PS1;
>>>>SET PS1.grno=NVL(ID.grno,SPACE(6)) ;
>>>>FROM PS1 ;
>>>>LEFT OUTER JOIN ID1 ON UPPER(PS1.employeeid)=UPPER(ID1.employeeid)
>>>>WHERE NVL(ID.grno,SPACE(6)) IS NOT NULL
>>>>
>>>>
>>>>the error is still present ?
>>>
>>>Thanks. It does not work.
>>
>>Redefine a new PS1 table.
>
>What do you mean?

NVL(ID.grno,SPACE(6)) is not null,
then PS1 cannot fire a null error.
Result: PS1 has a trigger or is corrupt.
Solution: Recreate PS1.
Previous
Reply
Map
View

Click here to load this message in the networking platform