G Allen R Souliere wrote:
> Oracle cannot cache the query if the insert statement itself changes  
> whenever a parameter is avoided due to being null.
> 
> On the other hand I think that:
> 
> <cfquery>
> INSERT INTO MYTABLE
> (
> MYCOLUMN
> ,MYACOLUMN
> ,MYBCOLUMN
> ,MYCCOLUMN
> ,MYDCOLUMN
> )
> VALUES
> (
> <cfqueryparam value="#myValue#">
> <cfif Len(Trim(myAValue))>,<cfqueryparam  
> value="#myAValue#"><cfelse>NULL</cfif>
> <cfif Len(Trim(myBValue))>,<cfqueryparam  
> value="#myBValue#"><cfelse>NULL</cfif>
> <cfif Len(Trim(myCValue))>,<cfqueryparam  
> value="#myCValue#"><cfelse>NULL</cfif>
> <cfif Len(Trim(myDValue))>,<cfqueryparam  
> value="#myDValue#"><cfelse>NULL</cfif>]
> )
> </cfquery>
> 
> may cache properly.
> 
> Does anyone have any insight into whether or not this is true?

You should be using PLSQL statements. Use CASE statements and
proper PLSQL and see what happens then.

-- 
LinkedIn: http://www.linkedin.com/pub/8/a4/60
Twitter:  http://twitter.com/RogerTheGeek
MissHunt: http://www.misshunt.com/ (Home of the Clean/Dirty Magnet)
CFinNC:   http://cfinnc.com/ ColdFusion Conference in Raleigh

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329560
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to