Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: UPDATE, Pro C, indicator variable to replace a Null in the table with data
Colgate-Palmolive <ksacher_at_worldnet.att.net> wrote in article
<6idv2i$s9b_at_bgtnsc01.worldnet.att.net>...
> ...
>
> EXEC SQL UPDATE SAP_MATERIAL_MASTER
> SET SAP_MATERIAL_TYPE_CODE =:ov_sap_material:ov_sap_material_ind
> WHERE SAP_MATERIAL_NUMBER=:ov_sap_material_num:ov_sap_material_num_ind;
>
The comparison with null doesn't work, so if ov_sap_material_num_ind <0
you'll update no rows. So you can rewrite the UPDATE statement using no
indicator variable and testing SAP_MATERIAL_NUMBER IS NULL.
--- Alexander I. Doroshko, aid_at_grant.kharkov.uaReceived on Sun May 03 1998 - 00:00:00 CDT