Re: Update to Null

2001-01-03 Thread David Shadovitz

Well, it worked.  I guess either my brain or my PC was slow in getting
back from vacation.
Thanks to those who wrote.
-David

On Tue, 02 Jan 2001 22:32:42 -0800 David Shadovitz <[EMAIL PROTECTED]>
writes:
> 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



RE: Update to Null

2001-01-03 Thread Philip Arnold - ASP

As long as the field allows nulls, then this shouldn't be a problem -
although I'm speaking from SQL Server experience and not Oracle...

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


> -Original Message-
> From: David Shadovitz [mailto:[EMAIL PROTECTED]]
> Sent: 03 January 2001 03:31
> 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



Re: Update to Null

2001-01-03 Thread Dave Hannum

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



Re: Update to Null

2001-01-02 Thread David Shadovitz

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



RE: Update to Null

2001-01-02 Thread Rick Lamb

   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