SQL Server Programming Part 14 - Transactions

  Рет қаралды 88,721

WiseOwlTutorials

WiseOwlTutorials

Күн бұрын

Пікірлер: 49
@mojgan2010
@mojgan2010 11 жыл бұрын
You have a natural talent for teaching. I've followed all the videos on SSRS and SQL. The explanations are very clear and interesting. Thank you for providing this. It's very much appreciated.
@navyahs4924
@navyahs4924 3 жыл бұрын
Informative video covering many concepts of SQL programming. One more good thing is there is no time spent in typing the queries.
@WiseOwlTutorials
@WiseOwlTutorials 3 жыл бұрын
Thanks Navya, happy to hear you enjoyed it!
@harishdevarapalli1537
@harishdevarapalli1537 9 жыл бұрын
i am beginer to ssrs,but after seeing your tutorilas,i experienced a lot of stuff ,but i am very hapy to say that these videos furnishes ultimate stuff,excellent explination,conceptual,i salute,that can i say to uuuu
@d3daiM
@d3daiM 10 жыл бұрын
you explain things so perfectly thank you.
@8bitnitwit
@8bitnitwit 11 жыл бұрын
Thanks for uploading this. Very straightforward and easily understandable.
@shawnhuang2277
@shawnhuang2277 5 жыл бұрын
This very well explained how transaction worked. Thanks a lot!
@codegate615
@codegate615 4 жыл бұрын
crazy 7 years later still worth XD
@Onella3DMusic
@Onella3DMusic 3 жыл бұрын
omg this was amazinggg thank u so much!
@WiseOwlTutorials
@WiseOwlTutorials 3 жыл бұрын
You're welcome, thanks for watching!
@marcin2x4
@marcin2x4 5 жыл бұрын
Note sure but how SAVE TRAN is working in the stored procedure? (21:19) These videos are HUGE amount of knowledge!!!!
@isabellearcadia7952
@isabellearcadia7952 10 жыл бұрын
Really wonderful ! So well explained ! Thank youuuuu !!!!!
@mankuzos1473
@mankuzos1473 7 жыл бұрын
This was quite useful and very well explained.
@tuncaytnn
@tuncaytnn 5 жыл бұрын
It was great work Thank you for give more inf about save and rollback trans.
@ghoulian
@ghoulian 4 жыл бұрын
outstanding!
@runenielsen8270
@runenielsen8270 9 жыл бұрын
Very good video! Helped me a lot in understanding transactions.
@BijouBakson
@BijouBakson 3 жыл бұрын
I know this is a very old video, but since this is one of the best resources I found on SQL I thought I'd still leave feedback regardless. At 12:00 the error message should have been something like: Cannot have more than 1 Iron Man 3; "Iron Man 3" already exist in the database. Why is this important? Because it keeps the focus on why you need to try and catch. I struggled for a moment to follow and I suspect others would too. Other than that, great content.
@WiseOwlTutorials
@WiseOwlTutorials 3 жыл бұрын
Thanks Bijou, appreciate the feedback!
@JI9131
@JI9131 10 жыл бұрын
very good and easy to understand.
@ionutzasaftei1989
@ionutzasaftei1989 8 жыл бұрын
Awesome job. Good explanation of the concept. :)
@majoromer
@majoromer 8 жыл бұрын
Please make audio volume for all wise owl tutorials higher
@MrHamuty
@MrHamuty 10 жыл бұрын
Excellent tutorial!
@sambarot3665
@sambarot3665 5 жыл бұрын
You are awesome
@gamers542
@gamers542 11 жыл бұрын
I find these SQL vids quite helpful as I am a newbie with SQL Server 2012. Couple things: 1.: Can you not set a breakpoint and debug auto rollback in a statement if you didn't want to put in error handling? 2.: Will there be a video on Triggers?
@pruthvirajgowda4566
@pruthvirajgowda4566 9 жыл бұрын
where did u mentioned the procedure name in 'exec'? can you explain me how it is working?
@michaeleichner7522
@michaeleichner7522 2 жыл бұрын
Given your example if you did the following: Delete from tblFilm where filmName = ‘Iron man 3’ Begin tran Insert into tblFilm(filmName, filmReleaseDate) Values( ‘Iron man 3’, ‘2013-04-25’) Insert into tblFilm(filmName, filmReleaseDate) Values( ‘Iron man 3’, ‘2013-04-30’) Commit Tran I would have expected that a Select * from tblFilm where filmName = ‘Iron man 3’ Would return no rows because of the automatic rollback. But that’s not what happened. Instead the first insert works returning the row where filmReleaseDate = 2013-04-25. Why is the first record inserted? I thought that Transactions where all or nothing. Thanks
@WiseOwlTutorials
@WiseOwlTutorials 2 жыл бұрын
Hi Michael, if you wanted to see the behaviour you describe you would need to write the two INSERT statements within a TRY block. In the CATCH block you would need to include an explicit ROLLBACK statement. Then, if either of the two INSERT statements throw an exception, both would be rolled back. I hope that helps!
@laszloneduka8875
@laszloneduka8875 3 жыл бұрын
Thank you.....
@WiseOwlTutorials
@WiseOwlTutorials 3 жыл бұрын
You're welcome!
@librkvn3355
@librkvn3355 11 жыл бұрын
Cant get the transaction to due to this error message! Cannot insert the value NULL into column 'FilmID', table 'Movies.dbo.tblFilm'; column does not allow nulls. INSERT fails. The statement has been terminated.
@krismaly
@krismaly 11 жыл бұрын
I enjoyed this video and all videos in this series. But I couldn't get ERROR handling videos nor error handling explained in detail any video. I would appreciate if you could make some ERROR handling and how to get over them would be a good video. I recommend all your videos to watch and take training at your website/Center. Thanks
@S2100211
@S2100211 3 жыл бұрын
I can not update the table tblFilm as I need to insert a value into the field FilmID as this field can not be Null. But I get the gist of what should be happening.
@WiseOwlTutorials
@WiseOwlTutorials 3 жыл бұрын
Sorry about that! I think that for this video I'd changed the design of the table but it's so long ago that I can't remember! Just for reference, you can allow insertion of values into an Identity column like so: SET IDENTITY_INSERT tblFilm ON Of course, if the identity column is a primary key you'll need to make sure that the value you're inserting is unique! I hope that helps!
@arnoldgyorgy989
@arnoldgyorgy989 8 жыл бұрын
thank you very much!
@jojogaotian
@jojogaotian 11 жыл бұрын
thank u. it is very helpful!
@ipsitapani8641
@ipsitapani8641 11 жыл бұрын
Thanks a lot sir.thank u very much.
@knutolansen7820
@knutolansen7820 6 жыл бұрын
linking because of content ;)
@samargul6370
@samargul6370 8 жыл бұрын
very nice thanks alot
@TheQciap
@TheQciap 10 жыл бұрын
Andrew, qq: Why in your assumption IF @IronMen is bigger than 1 not 0? IF @IronMen> 1 means that it can be already there once our movie in the list already. Even though you command "COMMIT TRAN". To me it will make it twice the same movie in our table or I am mistaken? Maybe too early for me in the morning ;) So to me it should be: IF @IronMen>0... BTW as always - great video!! :)
@samankhajehzadeh4445
@samankhajehzadeh4445 10 жыл бұрын
Hello all, Can anyone help me please I ran the syntax below: INSERT INTO tblFilm (FilmName,FilmReleaseDate) VALUES ('Iron Man 3', '2014-04-25') And received the following message: Msg 515, Level 16, State 2, Line 1 Cannot insert the value NULL into column 'FilmID', table 'Movies.dbo.tblFilm'; column does not allow nulls. INSERT fails. The statement has been terminated. Thank you for your help. I am a beginner
@samankhajehzadeh4445
@samankhajehzadeh4445 10 жыл бұрын
***** Thank you very much for your time Andrew. You are a legend.
@samankhajehzadeh4445
@samankhajehzadeh4445 10 жыл бұрын
***** Hi Andrew, Please excuse me for writing such long messages. When I execute the same syntax as yours (21min45secs), I receive the following message 1. I seem to be missing/not understanding something. Thank you for your time in advance. (1 row(s) affected) Msg 515, Level 16, State 2, Procedure spGetDirector, Line 9 Cannot insert the value NULL into column 'DirectorID', table 'Movies.dbo.tblDirector'; column does not allow nulls. INSERT fails. The statement has been terminated. The 'spGetDirector' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be returned instead. Msg 547, Level 16, State 0, Line 12 The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_tblFilm_tblDirector". The conflict occurred in database "Movies", table "dbo.tblDirector", column 'DirectorID'. The statement has been terminated.
@samankhajehzadeh4445
@samankhajehzadeh4445 10 жыл бұрын
***** Dear Andrew, Many thanks for your comprehensive answer. Much appreciated. I made the changes you advised and now it works.
9 жыл бұрын
+WiseOwlTutorials can you tell me how alter column so the number is added automatically?
@ipsitapani8641
@ipsitapani8641 11 жыл бұрын
VERY NICE EXPLANATION ..THANK U SO MUCH. BUT I HAVE ONE DOUBT WHAT IS THE ROLE OF THIS LINE IN STOREPROCEDURE: SAVE TRAN ADDDIRECTOR. with thanks ipsita.
@wasimzafri5224
@wasimzafri5224 10 жыл бұрын
Your Videos Are Always Great .. Thanks !!!! :-)
@ipsitapani8641
@ipsitapani8641 11 жыл бұрын
SIR PLZ UPLOAD A VIDEO ON TRIGGER.
@laszloneduka8875
@laszloneduka8875 3 жыл бұрын
Thank you.....
@WiseOwlTutorials
@WiseOwlTutorials 3 жыл бұрын
You're welcome, thank you for watching!
SQL Server Programming Part 15 - DML Triggers
18:10
WiseOwlTutorials
Рет қаралды 83 М.
SQL Server Programming Part 17 - The Pivot Operator
13:53
WiseOwlTutorials
Рет қаралды 71 М.
Why no RONALDO?! 🤔⚽️
00:28
Celine Dept
Рет қаралды 114 МЛН
Transactions in sql server   Part 57
11:18
kudvenkat
Рет қаралды 319 М.
Clustered vs. Nonclustered Index Structures in SQL Server
8:04
Voluntary DBA
Рет қаралды 665 М.
SQL Server Programming Part 18 - Dynamic Pivot Tables
13:08
WiseOwlTutorials
Рет қаралды 67 М.
75 How to debug stored procedure in sql server
14:41
Learn SSIS
Рет қаралды 21 М.
SQL Server Programming Part 16 - DDL Triggers
20:18
WiseOwlTutorials
Рет қаралды 60 М.
SQL Server Stored Procedure - How To
10:38
Database Star
Рет қаралды 17 М.
SQL Server Programming Part 12 - Cursors
27:19
WiseOwlTutorials
Рет қаралды 125 М.