I would suggest
INSERT INTO tblMember(name,address)
VALUES('#iif(len(attributes.name), DE(trim(attributes.name)),
DE("NULL"))#','#iif(len(attributes.address), DE(trim(attributes.address)),
DE("NULL"))#')
Inserting anything other than the value NULL is not a null to SQL.
Taco Fleur
----- Original Message -----
From: "<"Luce>,Greg"" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, February 13, 2003 6:14 AM
Subject: SQL Nulls
> Does anyone have any tips to keep SQL from writing form data that's not
> filled in as NULL instead of a space? I've never given this much
> consideration, because Oracle which I started Cfing with puts NULL in a
> field if you do: VALUES('','','') but now I find SQL Server puts a space
(or
> something other than null) according to Enterprise Manager.
>
> I've always done this:
> INSERT INTO tblMember(name,address)
> VALUES('#trim(attributes.name)#','#trim(attributes.address)#')
> But the value it puts for name or address aren't null in Ent. Manager if
no
> value is put in the form field. Does a space take more disk space than a
> NULL?
>
> Greg
> ***Sterling Financial Investment Group, Inc. (SFIG) is a member of
> NASD/MSRB/NFA/SIPC. Email transmissions may be monitored. SFIG cannot
> accept orders to buy or sell via email. Please visit www.mysterling.com
for
> more information.***
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4