Re: Insert best practice

2006-09-27 Thread Matt Robertson
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

RE: Insert best practice

2006-09-27 Thread Snake
:[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

Re: Insert best practice

2006-09-27 Thread Teddy Payne
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

RE: Insert best practice

2006-09-27 Thread COLLIE David
> 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

RE: Insert best practice

2006-09-27 Thread DURETTE, STEVEN J \(ASI-AIT\)
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="

Re: Insert best practice

2006-09-27 Thread Victor Moore
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

RE: Insert best practice

2006-09-27 Thread COLLIE David
> 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

RE: Insert best practice

2006-09-27 Thread Dawson, Michael
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

RE: Insert best practice

2006-09-27 Thread Snake
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

RE: Insert best practice

2006-09-27 Thread Ben Nadel
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

Insert best practice

2006-09-27 Thread Victor Moore
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