Friday, March 30, 2012

replacing nulls

Using the DTS ive successfully transfered data from access to sql - however
i need to replace the <nulls>
with '' - is there an easy way to do this ?
thanks
markUPDATE SomeTable
SET col1 = COALESCE(col1, ''),
col2 = COALESCE(col2, ''),
..
WHERE col1 IS NULL
OR col2 IS NULL
..
David Portas
SQL Server MVP
--|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:IfednUh_ya-M_ALdRVn-gQ@.giganews.com...
> UPDATE SomeTable
> SET col1 = COALESCE(col1, ''),
> col2 = COALESCE(col2, ''),
> ...
> WHERE col1 IS NULL
> OR col2 IS NULL
> ...
> --
> David Portas
> SQL Server MVP
> --
>
thanks for the help!
mark

No comments:

Post a Comment