Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace ALL fld while isnull(fld) .. .??

Status
Not open for further replies.

nirajj

Programmer
Mar 12, 2003
103
US
I am trying to replace all NULL values with Space or zero depending upon the datatype of the field in the readwrite cursor.

However,
REPLACE ALL fldName WITH '' WHILE ISNULL(fldName)
Doesnt seem to be working.
But if its numeric datatype it does work.
REPLACE ALL fldName WITH 0 WHILE ISNULL(fldName)

So looks like the problem is jsut with the character datatype. But ...
REPLACE next 1 fldName WITH '' WHILE ISNULL(fldName) (WORKS!!!)


Any idea what is going wrong here? Am I doing something wrong ?

All I want to do is replace all null values with '' or 0. And other solution will also be appreciated.


Thanks!

 
Ignore.. !!!!

Found the solution. I should be using FOR instead of WHILE

REPLACE all identifier WITH '' FOR ISNULL(identifier) (works fine)




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top