From: "Jay Liam" <[EMAIL PROTECTED]>
> I got one stupid question. I am facing problem by filtering record
> from my MS SQL database on Windows2000. For one column, some of my
> records has NULL value and some has nothing, which i believe space
> character, not null. Wat I want to do is to be consistent my
> database. I want to change all of my space character with NULL value.
> Any of you guys can suggest me how to write update query to replace
> all the space column with NULL value. I tried but I couldn't get the
> space value.
update MyTable set MyColumn = NULL where MyColumn = ''
I bet it's not a space, but an empty string.
If you still see some that are not NULL, but look empty try this:
update MyTable set MyColumn = NULL
where ltrim(MyColumn) = ''
HTH, Jenda
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl