I think you are all correct.  How would I solve a situation on a new insert
where the user posts an email address, but then sometime later comes back
and does a data update removing the address, I would want a NULL value then
be SET.  Is the statement below correct.


<cfquery name="updateObj" datasource = "DSN1">
    Update MyTable
        SET email = <cfif Len(FORM.email)>'#FORM.email#'<cfelse>NULL</cfif>
    Where memberID = #FORM.memberID#

Thanks, Mark

-----Original Message-----
From: Schuster, Steven [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 1:46 PM
To: CF-Talk
Subject: RE: MS-SQL 2000 NULL Problem

When you design a table you have a property called Allow Nulls, make sure
that it is checked. Then the default will be NULL and not " " or something
else. Then as inserts occur you can be assured that NULL fields are actually
NULL and not equivelant nulls like " " or Null typed into a varchar field.

I know it sounds odd, and it is, but that's the way NULLS are...

-----Original Message-----
From: Nick de Voil [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 1:39 PM
To: CF-Talk
Subject: Re: MS-SQL 2000 NULL Problem

Mark

> All the empty fields in the email db contain <null>

How exactly do you know the email field is null? It seems to me that if
"WHERE L.email IS NOT NULL" returns the rows, then that's the surest proof
that the field is not null.

Nick
  _____
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to