I have always used
You guys are saying the null parameter is not necessary? Wouldn't
that insert an empty string rather than a null?
--
[EMAIL PROTECTED]
Janitor, MSB Web Systems
mysecretbase.com
~|
Introducing the Fusion Aut
:[EMAIL PROTECTED]
Sent: 27 September 2006 17:22
To: CF-Talk
Subject: RE: Insert best practice
> Cfqueryparam allows to to specify that NULL values are allowed anyway,
> so you don't need to do that check.
Can you explain what you mean? ColdFusion has no concept of null. The NULL
attrib
If you are using MS SQL Server, create a stored proc and let the null
handlers like isNull() and nullIF() handle these for you.
A friend of mine showed me this little trick:
select
column
from
table
where
IsNull(ID,'') = IsNull(NullIf(@ID,''),IsNull(ID,''))
This allows you to create
> Cfqueryparam allows to to specify that NULL values are
> allowed anyway, so you don't need to do that check.
Can you explain what you mean? ColdFusion has no concept of null. The
NULL attribute, if set to 'YES' means that CFQUERYPARAM ignores the
value in the VALUE attribute and passed the da
y value.
Steve.
-Original Message-
From: COLLIE David [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 27, 2006 12:03 PM
To: CF-Talk
Subject: RE: Insert best practice
> I was wondering which one are best practices when doing a db
> insert/update:
> null="
Thanks all.
I think I will stick with the second one. Maybe more typing but it's
cleaner.
Cheers
Victor
~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your p
> I was wondering which one are best practices when doing a db
> insert/update:
> null="#iif((filed eq ""), de("yes"), de("no"))#" />,
>
> or
>
> cfsqltype="CF_SQL_INTEGER" />
>null
>
Def the first one in my opinion.
Roll your own isNull() UDF to get rid of the IIF. You w
2006 10:51 AM
To: CF-Talk
Subject: Insert best practice
Hi,
I was wondering which one are best practices when doing a db
insert/update:
,
or
null
First one seems more compact but not sure the delay evaluation. I mean
for a couple a columns I guess it doesn't matter but for
Cfqueryparam allows to to specify that NULL values are allowed anyway, so
you don't need to do that check.
Russ
-Original Message-
From: Victor Moore [mailto:[EMAIL PROTECTED]
Sent: 27 September 2006 16:51
To: CF-Talk
Subject: Insert best practice
Hi,
I was wondering which on
d Advanced ColdFusion Developer
www.bennadel.com
-Original Message-
From: Victor Moore [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 27, 2006 11:51 AM
To: CF-Talk
Subject: Insert best practice
Hi,
I was wondering which one are best practices when doing a db
insert/upd
Hi,
I was wondering which one are best practices when doing a db insert/update:
,
or
null
First one seems more compact but not sure the delay evaluation. I mean for a
couple a columns I guess it doesn't matter but for a big table it may add
up.
The second one looks more clear
11 matches
Mail list logo