As a part of migration to .net we are redesigning sql server 7 database and moving it to sql server 2005. There are a lot of fields with dbnull value in the existing db. It would be nice to populate them with some default value while transfering data to the new datbase on sql server 2005.
What is the best way to deal with the issue, are there any possible drawbacks and problems.
Your input will be greatly appreciated.
Getting rid of NULLs/having default values is generally a good thing. It removes a lot of overhead in your code to constantly check for NULLs. You can write UPDATE queries to update the NULLs to some default values. A sample update query could be:
UPDATE yourTable SET Price = 0 WHERE Price IS NULL
sql
No comments:
Post a Comment