How would do this in pure stored procedure sql? Either @personkey or @cfuserid will be passed, the other will be null, replacing the attributes vars.
INSERT INTO rhkprod_tblCartAdjustments ( <cfif len(attributes.personKey)> tblPeopleFK </cfif> <cfif len(attributes.cfUserID)> cfUserID </cfif> ,tblProductsFK ,adjusted ,originalQuantity ,adjustedQuantity ) VALUES ( <cfif len(attributes.personKey)> #attributes.personKey# </cfif> <cfif len(attributes.cfUserID)> '#attributes.cfUserID#' </cfif> ,@tblProductsFK ,1 ,@cartQuantity ,@quantity ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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-community/message.cfm/messageid:314726 Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm
