Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL command toFill empty filed

Author  Topic 

Nasser
Starting Member

12 Posts

Posted - 2007-06-18 : 07:56:06
Hello there

How are you? Hope fine and healthy

I have hug database which contain empty filed, I would like to fill the empty filed by inserting 0 in each empty filed using SQL command

May I have help please?

Thanks in advance

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-18 : 08:03:22
[code]Update Table
set EmptyCol = 0
Where EmptyCol = '' or EmptyCol Is NULL[/code]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-06-20 : 06:48:58
or

Update Table
set EmptyCol = 0
Where Coalesce(EmptyCol,'') = ''

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -