Is it possible to set null value back in SQL server 2000?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, everyone

I have a column 'date' is datetime type and allow null value in SQL server 2000
if I insert a recod without set 'date' value that is null, but after I set the date value, such as 1/1/04, then I want to delete the 'date' value again. the system will set the value as 1/1/1900. Is it possible to set it as null again

Thanks for your help

Haiwe
 
Haiwen:

How are you trying to do this? You should be able to use something like
UPDATE myTable
Set DateColumn = NULL
WHERE whatever = @Whatever
haiwen said:
Hello, everyone,

I have a column 'date' is datetime type and allow null value in SQL server 2000.
if I insert a recod without set 'date' value that is null, but after I set
the date value, such as 1/1/04, then I want to delete the 'date' value
again. the system will set the value as 1/1/1900. Is it possible to set it
as null again?
 
I have a column 'date' is datetime type and allow null value in SQL
server 2000. if I insert a recod without set 'date' value that is null,
but after I set the date value, such as 1/1/04, then I want to delete
the 'date' value again. the system will set the value as 1/1/1900. Is it
possible to set it as null again?

Try setting your parameter value to DBNull.Value.

-Derek
 
Hi Haiwen,

Try this:
dateval = dbnull.value

HTH,

Bernie Yaeger

haiwen said:
Hello, everyone,

I have a column 'date' is datetime type and allow null value in SQL server 2000.
if I insert a recod without set 'date' value that is null, but after I set
the date value, such as 1/1/04, then I want to delete the 'date' value
again. the system will set the value as 1/1/1900. Is it possible to set it
as null again?
 
Back
Top