Home > Archive > microsoft.public.sqlserver.server > November 2002 > Unable to delete "null" entries





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Unable to delete "null" entries
Steve Good

2002-11-11, 9:23 am

I have a table that has 17 columms of data and somehow I
have 4 rows that are all "null" fields. I am unable to
delete them for some reason. Can someone tell me how I
might beable to delete these rows?
Dejan Sarka

2002-11-11, 9:23 am

DELETE FROM tablex
WHERE col1 IS NULL and col2 IS NULL and ...

Be sure to include all columns in Where condition, so you won't accidentaly
delete wrong rows.

--
Dejan Sarka, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com
Please reply only to the newsgroups.
PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Steve Good" <steve.good@colstrip.k12.mt.us> wrote in message
news:3d0b01c28994$3fd6c4c0$3be
f2ecf@TKMSFTNGXA10...
> I have a table that has 17 columms of data and somehow I
> have 4 rows that are all "null" fields. I am unable to
> delete them for some reason. Can someone tell me how I
> might beable to delete these rows?



Adi Cohn

2002-11-11, 10:24 am

Are you trying to do delete statement and in the WHERE clause your are
writing something like that:

WHERE MyCol = NULL

If you are, then it will not work. Try to modify it so it will look like
that

WHERE MyCol IS NULL

If this doesn't help, then write your code and if you get an error, then
write the error number and error description, so it will be much easier to
answer your question

Adi
"Steve Good" <steve.good@colstrip.k12.mt.us> wrote in message
news:3d0b01c28994$3fd6c4c0$3be
f2ecf@TKMSFTNGXA10...
> I have a table that has 17 columms of data and somehow I
> have 4 rows that are all "null" fields. I am unable to
> delete them for some reason. Can someone tell me how I
> might beable to delete these rows?



Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net