At my full time job, we just put the sql file in vc. Worked well enough. On Sat, Apr 3, 2010 at 2:50 PM, Zaphod Beeblebrox < zaph0d.b33bl3b...@gmail.com> wrote:
> > Yeah, but you also lose portability and ease of maintenance. I hate > having stored procs because I've never found a good way to put the > code into vc. > > Sent from my iPhone > > On Apr 2, 2010, at 6:20 PM, Matthew Smith <chedders...@gmail.com> wrote: > > > > > You lose the performance benefit of a stored procedure with a > > dynamic sql > > string. > > > > On Fri, Apr 2, 2010 at 7:57 AM, LRS Scout <lrssc...@gmail.com> wrote: > > > >> > >> I woulnd't.?\ > >> > >> I'd build the sql as a string, then execute it. But I'm lazy. > >> > >> Sounds like it should be 2 procedures and you call the correct one > >> based > >> off > >> of a cf variable. > >> > >> -----Original Message----- > >> From: Matthew Smith [mailto:chedders...@gmail.com] > >> Sent: Thursday, April 01, 2010 5:15 AM > >> To: cf-community > >> Subject: porting cf code to a stored proc > >> > >> > >> 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:314936 Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm