Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacing null values with 0
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Replacing null values with 0
Miscellaneous
Thread ID:
01216824
Message ID:
01216824
Views:
62
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
Next
Reply
Map
View

Click here to load this message in the networking platform