![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
-----Original Message----- Hello Jamie ! Sorry but this aint the way it goes. DDL Statements such as alter,create,drop fires an Implicit commit to send the changes directly to the database. HTH, Jens Süßmeyer. . |
#4
| |||
| |||
|
|
Hello Jamie ! Sorry but this aint the way it goes. DDL Statements such as alter,create,drop fires an Implicit commit to send the changes directly to the database. HTH, Jens Süßmeyer. |
#5
| |||
| |||
|
|
Hello Jamie ! Sorry but this aint the way it goes. DDL Statements such as alter,create,drop fires an Implicit commit to send the changes directly to the database. HTH, Jens Süßmeyer. |
#6
| |||
| |||
|
|
Hello, I know that it is possible to put DDL statements (i.e. CREATE TABLE, DROP TABLE etc...) in transactions but I have found a peculiarity that I am trying to get around. I issued the following: BEGIN TRANSACTION CREATE VIEW TempView AS select * from tempTable COMMIT TRANSACTION It gave the following error message: Server: Msg111, level 15, State 1, Line 2 'CREATE VIEW' must be the first statement in a query batch Can anyone find a way around this using the simple T-SQL code above? Thanks in advance Jamie P.S. Why is there no microsoft.public.sqlserver.tsql newsgroup? |
#7
| |||
| |||
|
|
-----Original Message----- DDL does not issue an implicit commit in SQL Server, although this may be the case with some other RDBMS vendors. -- Hope this helps. Dan Guzman SQL Server MVP ----------------------- SQL FAQ links (courtesy Neil Pike): http://www.ntfaq.com/Articles/Index....partmentID=800 http://www.sqlserverfaq.com http://www.mssqlserver.com/faq ----------------------- "Jens Süßmeyer" <jsuessmeyer@(Remove_ME]web.de> wrote in message news:OEoreq$ZDHA.3768 (AT) tk2msftngp13 (DOT) phx.gbl... Hello Jamie ! Sorry but this aint the way it goes. DDL Statements such as alter,create,drop fires an Implicit commit to send the changes directly to the database. HTH, Jens Süßmeyer. . |
#8
| |||
| |||
|
|
BEGIN TRANSACTION GO CREATE VIEW TempView AS select * from tempTable GO COMMIT TRANSACTION GO |
![]() |
| Thread Tools | |
| Display Modes | |
| |