This will work for Oracle (or any other RDBMS) provided the column in the
table is set to accept NULLs.

FWIW
Dave


=================================
"What we need is a list of specific unknown problems we will encounter"

David Hannum
Web Analyst/Programmer
Ohio University
[EMAIL PROTECTED]
(740) 597-2524



----- Original Message -----
From: "David Shadovitz" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, January 03, 2001 1:32 AM
Subject: Re: Update to Null


Hmm.  I'm using Oracle.  I thought I tried this just before I escaped
from my office today.  I'll try it again in the morning.
Thanks.
-David

On Tue, 02 Jan 2001 22:27:17 -0600 [EMAIL PROTECTED] (Rick Lamb)
writes:
>    UPDATE Employees
>    SET Age = NULL
>    WHERE Id = 2
>
> This has always worked fine for me using MS SQL 7.0 and MS Access.
>
> Rick
>
> -----Original Message-----
> From: David Shadovitz [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 02, 2001 9:31 PM
> To: CF-Talk
> Subject: OT: Update to Null
>
>
> Is it possible to UPDATE the value of a numeric field to NULL?
>
> Here's the scenario, which must be common:
>
> The records of the Employees database table are displayed in an HTML
> table, with an Edit and Delete button in each row.  The user clicks
> Edit
> to display a particular record in an editable form.  If the user
> clears
> the Age field and submits the form, what would the SQL UPDATE
> statement
> look like?
>
> I don't think this works:
>    UPDATE Employees
>    SET Age = NULL
>    WHERE Id = 2
>
> I could test on FORM.Age and then do "SET Age = -1" if no age was
> specified, but I'd rather not.
>
> Thanks.
> -David
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to