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
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Insert NULL into smalldatetime datatype field.

Author  Topic 

srinivas.alwala
Starting Member

30 Posts

Posted - 2008-03-20 : 04:45:44

Hi,

I am facing problem while inserting a Null value into a smalldatetime datatype field in sql server 2000 using code in vb 6.0

Error as : Type mismatch.

Kindly let me know how to insert Null or blank (dtDate = "") into a column.

Regards,

Srinivas Alwala

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-03-20 : 04:56:47
Blank ("") is not the same as NULL. If you have the field set to Nullable the you should be able to do:

insert into <table> (datefield) values (NULL)
Go to Top of Page
   

- Advertisement -