Depending on your DB setting the field to null might work...

i.e.

Update foo
Set bar = null

Failing that have a look at using <CFQUERYPARAM> in your queries.. That
tag allows you to send null values to the query..


HTH



-----Original Message-----
From: Susan H. Allen [mailto:susan_hamilton_allen@;hotmail.com] 
Sent: Tuesday, October 22, 2002 13:35
To: SQL
Subject: Passing NULL to SQL Server


I am having a hard time passing <NULL> values to SQL Server -- the DBA
has enabled NULLs for integer and bit fields (yeah, a bit field should
be 1 or 0, not NULL, but not my call).  I am writing standardized
queries to insert and update these tables, and I need to insert a <NULL>
in these fields; I know this is probably really basic, but it's driving
me nuts.  If an insert query does not explicitly write to these fields,
a <NULL> is inserted, but I want to write to all fields so that these
queries are all standardized throughout the application.  (And, of
course, if one of these fields in an update holds data but now must be
cleared, I need to write a <NULL>). Any tips would be much appreciated.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=6
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/sql
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to