If you do not use stored procedures, you could do this:
 
UPDATE blah
SET thisAttribute = <cfif isdefined('var')>#var#<cfelse>NULL</cfif>
WHERE someStuff = someOtherStuff
 
The problem you had is that it reads:
<cfset var = ""> as and empty string
and
<cfset var = "NULL"> as the actual string "NULL"
-----Original Message-----
From: Adaryl Wakefield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 10:40 AM
To: [EMAIL PROTECTED]
Subject: [KCFusion]

I have need to update a table and set a value to NULL like
 
UPDATE blah
SET thisAttribute = nullValueHere
WHERE someStuff = someOtherStuff
 
so far I've tried
<cfset var = "">
and
<cfset var = "NULL">
 
and some other things but so far nothing. Anybody know right off the bat where I'm going wrong?
A.

Reply via email to