Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replacing null values with 0
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01216824
Message ID:
01216839
Vues:
19
>>I am creating a readwrite cursor and trying to replace .NULL. values in a column with zeroes, but the changes are not taking place. Here is my code:
>>
>>
>>SELECT P_productname, O_orddte, O_qty, ;
>Sum_rd_qtyrec, O_unitprice, O_checkmark, O_tmp_qtyrec, ;
>O_tmp_daterec, O_tmp_amt, O_orderid, ;
>O_p_productid from lv_order_by_dte_completed ;
>INTO CURSOR crs_grid readwrite
>>SELECT crs_grid
>>UPDATE crs_grid SET crs_grid.Sum_rd_qtyrec = 0 ;
>WHERE EMPTY(crs_grid.Sum_rd_qtyrec)
>>
>>UPDATE crs_grid SET crs_grid.Sum_rd_qtyrec = 0 ;
>WHERE crs_grid.Sum_rd_qtyrec = null
>>
>>
>>I have tried it with empty and null in the where clause. Any insight into handling this problems. Thanks in advance.
>>
>>Nick
>
>You can use NVL function in SELECT or use
WHERE crs_grid.Sum_rd_qtyrec IS null
>
>NVL function is for VFP back-end. In SQL Server you would use ISNULL function.
>
>WHERE FIELD IS NULL is the same in VFP/SQL Server.

thanks guys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform