jlwilliams1
Valued Member
Points: 56
More actions
April 30, 2003 at 12:01 pm
#80010
How do I get rid of nulls in certain fields. In the old dbase, I could simply do a REPLACE. Is there an equivalent in SQL? Thanks for any help.
SQLBill
SSC Guru
Points: 51440
April 30, 2003 at 12:06 pm
#455845
Check out the Books OnLine for ISNULL.
ISNULL(check_expression, replacement_expression)
Select ISNULL(mycolumn, 'NewEntry')
-SQLBill
April 30, 2003 at 12:08 pm
#455846
Or you could use IS NULL:
UPDATE mytable
SET mycolumn = 'newentry'
WHERE mycolumn IS NULL
April 30, 2003 at 12:29 pm
#455850
Ok, thanks. That worked fine.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply