On Fri, 2005-03-11 at 10:20 -0800, Keith Herold wrote: > Is there a difference between COMMIT and END TRANSACTION ? > > I have a batch process that commits sets of 25 pre-built sql scripts > on a timed basis. I have been wrapping the execution of all 25 sets > in a single begin...end transaction set. The problem is that if any > of those scripts fails to execute properly, than all 25 scripts are > rolled back. It would be nice to get a bit better granuality, with > partial commits or something. > > Enter COMMIT. Does it allow you to commit portions of the sql > scripts? I.e., could I start a BEGIN TRANSACTION; then at the end of > each script execute a COMMIT to successfully commit that portion, and > then proceed to the end, and END TRANSACTION. That way, if somewhere > down the line, I lose the 15th file, at least the first 14 are in the > database. >
COMMIT and END are the same thing. To do what you are trying to do above, you should COMMIT then immediately do another BEGIN. -- D. Richard Hipp <[EMAIL PROTECTED]>