UPDATE fields with NULL - nartla

06-Nov-07 06:29:18
Hello,

I am working in an app in VBA/Access, which stores data in a SQL
Server database.

I am trying to update some nullable fields in my SQL Server database
with NULL, with the following syntax :

UPDATE MYTABLE SET MYDATA = NULL WHERE ID_PROJECT = 111

but I get a 3144 error and a message saying that the UPDATE syntax is
not correct.

Is there some specific syntax in SQL Server to update data with NULL ?

Thank you for your help.
button
 
 

UPDATE fields with NULL - Tibor Karaszi

06-Nov-07 06:42:06
The UPDATE statement you posted seem fine to me.

You can trace the statement submitted to SQL Server using Profiler to verify that this is what is
actually submitted by your app.

Also, there could be a trigger on the table and the problem is in fact in the trigger.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
button
 

UPDATE fields with NULL - nartla

06-Nov-07 08:52:35
On 6 nov, 12:42, "Tibor Karaszi"
ify that this is what is
the trigger.
http://sqlblog.com/blogs/tibor_karaszi

OK, I had a closer look to my code, and I found that the problem was
not with the NULL value, but in another part of the SQL request.

Thank you for your answer.
button
 
SSIS Wizard