>- see footer for list info -< Could be wrong, but I think I remember that ALTER TABLE statements must be the last statement in a batch so having them in the one <cfquery> might not work.
Shaffiq, can you not just try it to see? Adrian > -----Original Message----- > From: [email protected] [mailto:dev- > [email protected]] On Behalf Of Duncan Cumming > Sent: 06 February 2009 12:21 > To: cfuk > Subject: Re: [CF-Dev] Execute DB Script in CF > > >- see footer for list info -< > I think you should be able to do it all in one query, just as you've > got it there. And either put your Update query in the same cfquery, or > do it as a separate cfquery. > > <cfquery name="updateTable" datasource="dsn"> > ALTER TRIGGER PROJ_VER_STATUS_HISTORY_TRIG DISABLE; > ALTER TRIGGER OPTIONS_TRIG DISABLE; > ALTER TRIGGER WBS_BUDGET_AMT_TRIG DISABLE; > > UPDATE table > SET a=b, x=y > WHERE foo=bar > </cfquery> > > > Alternatively, do each alter trigger statement in a separate cfquery, > and wrap the whole thing in a cftransaction. > > > "Think Green" and only print this email if absolutely necessary > > >>> mohd shaffiq mohd yusof <[email protected]> 06/02/2009 02:54 >>> > >- see footer for list info -< > Hi Guys, > > I have 3 trigger to set to disabled before updating the table. > I want to do it from coldfusion not from db site. So how to include > this scripts in better way and make sure it working. > The scripts :- > > ALTER TRIGGER PROJ_VER_STATUS_HISTORY_TRIG DISABLE; > ALTER TRIGGER OPTIONS_TRIG DISABLE; > ALTER TRIGGER WBS_BUDGET_AMT_TRIG DISABLE; > > Can I just put it under cfquery tag? but can i perform 3 script in > single tag? > > > Need Help, > Shaffiq _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
