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 2008 Forums
 Transact-SQL (2008)
 NULL VALUE INSERT

Author  Topic 

desikankannan
Posting Yak Master

152 Posts

Posted - 2013-11-28 : 12:51:39

i have foreign key field allow NULL, i try to insert blank space "" , i want to enter NULL VALUE
it shows the error

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Funeral". The conflict occurred in database "mowerylatestfile", table "dbo.tblfuneral", column 'fid'.
The statement has been terminated.

Desikankannan

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2013-11-28 : 19:28:33
blank space "" is not NULL value

if you want to interpret blank as NULL, use NULLIF( <value>, '')


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -