I've followed all your tutorials and you are excellent!!! The only thing that comes to my mind is how many valuable hours,days & months you've spent to provide these marvelous tutorials expecting nothing in return. You have a wonderful & blessed life ahead SIR. Thank you so much and your deeds are highly appreciated
+sai krishna Thank you very much for taking time to give feedback Sai. This means a lot. I am very glad you found the videos useful. I have organised all the Dot Net & SQL Server videos in to playlists, which could be useful to you ruclips.net/user/kudvenkatplaylists?view=1&sort=dd If you need DVDs or to download all the videos for offline viewing please visit www.pragimtech.com/kudvenkat_dvd.aspx Slides and Text Version of the videos can be found on my blog csharp-video-tutorials.blogspot.com Tips to effectively use my youtube channel. ruclips.net/video/y780MwhY70s/видео.html If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel. ruclips.net/user/kudvenkat If you like these videos, please click on the THUMBS UP button below the video. May I ask you for a favor. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them. Good Luck Venkat
The quality of the video depends on your internet connection bandwidth. All the videos are uploaded in HD quality. To improve the video quality, click the settings button that is present at the lower bottom right hand corner of the youtube player. In the description of this video, I have included the link for ASP .NET, C#, and SQL Server playlists. All the videos are arranged in logical sequence in these playlists, which could be useful to you. Please share the link with your friends.
I a so happy that I've found your channel. You explanation so clear , even for person that doesnt have any knowledge at sql. Thank you very much for your work.
Thank You Endlessly Dearest,Most Respected and perfect child of your great God Sir Venkat for all your Great Videos Series. Your ways of Demonstrations, illustrations and tutor are just simply Greatest of the Great. You are Blessed by Thousands and thousands of people. You are One of the God's Gift directly sent from Heaven to mankind. God Bless you for all Eternity...!!! Have a Great Day to You Forever and Ever.
hi venkat sir really helpfull fr me sir...your videos are pretty simple to understand sir and i like your way of teaching sir..plz can you explain the WPF,WCF topics sir..its really helpful fr me sir ...thanks..great job ..
Sir, your videos are wonderful and good.Can you please say me where can I get good training questions and solutions for SQL programming.. As I have learnt the basis, I need to get trained on the complex queries.
Please I have a question, what if the second statement raises an error as well, how do we handle that e.g. we replace 'select * from products' with another insert or update statement that can generate violation?
Could you just set the Primary key column of the second table to be identity (autoincremented)? PS: This may be your best tutorial yet. Not only you explain error handling, but you present an interesting issue solution with sophisticated script.
This is interesting. However, couldn't you have the sales id column be auto increment? Also, in a real world environment, wouldn't it be that if you have 90 on hand, you sell 100, the on hand qty would become 0 and you'd back order 10? In this case, you'd have a third table for the back ordered items.
@Venkat, shouldn't we use auto increment for 'productSalesId' column ? if we use the method as shown in video. what happens when say the same procedure is triggered from two different end points ?
Identity is automatic when specified in the initial table. It is left out on purpose to demonstrate an error. Specifically, to demonstrate the first portion of the stored procedure works, reducing the quantity available, but not recording the transaction of the sale. This is inconsistent, and one of the reasons for using Error Handling in the first place. Notice the end of the stored procedure declares and inserts @MaxProductSalesID. If we used Identity in tblProductSales, we would be able to avoid declaring the final variable. But then, there would be no error, and so there would be no lesson for the video to demonstrate.
Sir thank you so much for explaining the same in such a marvelous way.... I just want to know that do you have any paid online sessions of SQL Server too where you have provided even further details for SQL Server? If yes how to access the same kindly let me know please.....
first of all I wanna say thank u very much, you`re my fav teacher. what I wanna know if my ID column is set to automatically calculated (identity, 100,1 - beginning from 100 and increasing by one) do I still need that clause? coz as I understood, it is only because when you manually enter the iD
instead of calculating the ID in tblproductsales, shouldn't we just use identity (1,1) in the first place so that it automatically inserts after the previous ID?
The Videos are excellent . I just have one Basic Question . Why 'Declare' key word is used to Declare '@Stockavailable' Variable but not used for @ProductID Variable . Thanks in advance
How the control is going to the next statement after insert statement if there isn't error in insert statement. My question is how control is going to if statement if there is an error in insert statement.
On Product sales table name of column does not match with insert command. On insert command it is @maxproductsalesid,@productid, qunatity to sell but after execution it came productsaleid, product id and qunatity sold. Could you kindly explain?
Thank you for this wonderful video. I just wrote another print statement inside the @@error0 statement to see the value of @@error. It is showing the value as 0 only. Can you please help
I followed your tutorial and tried to run the below statement. declare @error int insert into tblproductsales values(5,5,10) set @error=@@ERROR select *from tblproductsales if (@@ERROR0) Print 'Error Occurred' Else Print 'No errors' But I'm not getting Error Occurred msg instead it's executing else statement. Msg 2627, Level 14, State 1, Line 728 Violation of PRIMARY KEY constraint 'PK__tblprodu__1B97317E93C37F32'. Cannot insert duplicate key in object 'dbo.tblproductsales'. The duplicate key value is (5). The statement has been terminated. (5 rows affected) No errors
Am not getting error. Ram is not there. i want to make an error and print Transaction rolled back. Declare @Error int insert into tblEmployee values('Mobile Phone',1500, 100,'ram') if(@@ERROR 0) Begin print 'Transaction rolled back' End else Begin print 'Transaction Commited' End
I've followed all your tutorials and you are excellent!!! The only thing that comes to my mind is how many valuable hours,days & months you've spent to provide these marvelous tutorials expecting nothing in return. You have a wonderful & blessed life ahead SIR. Thank you so much and your deeds are highly appreciated
+sai krishna Thank you very much for taking time to give feedback Sai. This means a lot. I am very glad you found the videos useful.
I have organised all the Dot Net & SQL Server videos in to playlists, which could be useful to you
ruclips.net/user/kudvenkatplaylists?view=1&sort=dd
If you need DVDs or to download all the videos for offline viewing please visit
www.pragimtech.com/kudvenkat_dvd.aspx
Slides and Text Version of the videos can be found on my blog
csharp-video-tutorials.blogspot.com
Tips to effectively use my youtube channel.
ruclips.net/video/y780MwhY70s/видео.html
If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel.
ruclips.net/user/kudvenkat
If you like these videos, please click on the THUMBS UP button below the video.
May I ask you for a favor. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them.
Good Luck
Venkat
The quality of the video depends on your internet connection bandwidth. All the videos are uploaded in HD quality. To improve the video quality, click the settings button that is present at the lower bottom right hand corner of the youtube player. In the description of this video, I have included the link for ASP .NET, C#, and SQL Server playlists. All the videos are arranged in logical sequence in these playlists, which could be useful to you. Please share the link with your friends.
I a so happy that I've found your channel. You explanation so clear , even for person that doesnt have any knowledge at sql. Thank you very much for your work.
This man is a legend!
Thank you Sir for these videos. It was not easy to prepare this course, it's on the highest level. U are great teacher , my greatest admiration!
I must confess: you have nice tutorials here. I will make sure I start the tutorials from part 1 till the end.
The cleanest language you have, sir. Love your videos
Thank You Endlessly Dearest,Most Respected and perfect child of your great God Sir Venkat for all your Great Videos Series.
Your ways of Demonstrations, illustrations and tutor are just simply Greatest of the Great. You are Blessed by Thousands and thousands of people. You are One of the God's Gift directly sent from Heaven to mankind. God Bless you for all Eternity...!!! Have a Great Day to You Forever and Ever.
awesome video sir finally understood the actual use of error handling thanku very much venket sir :)
Wow so straight forward. Your videos are excellent!!
hi venkat sir really helpfull fr me sir...your videos are pretty simple to understand sir and i like your way of teaching sir..plz can you explain the WPF,WCF topics sir..its really helpful fr me sir ...thanks..great job ..
Very informative. Keep up d good work
Thanks Kudvenkat for the excellent tutorial
Revisiting
Thanks for educating the community.
Thanks a lot
Sir, your videos are wonderful and good.Can you please say me where can I get good training questions and solutions for SQL programming.. As I have learnt the basis, I need to get trained on the complex queries.
You are great... Sir
0:25 - Introduction of PLSQL Codes
Great post, i will like your every post.
Thanks for your knowledge sharing.. thanks a lot sir .
Please I have a question, what if the second statement raises an error as well, how do we handle that e.g. we replace 'select * from products' with another insert or update statement that can generate violation?
Could you just set the Primary key column of the second table to be identity (autoincremented)?
PS: This may be your best tutorial yet. Not only you explain error handling, but you present an interesting issue solution with sophisticated script.
Thats what i was thinking, its a very long winded method.
I am getting error if I autoincremented
I am getting error if I autoincremented
This is interesting. However, couldn't you have the sales id column be auto increment? Also, in a real world environment, wouldn't it be that if you have 90 on hand, you sell 100, the on hand qty would become 0 and you'd back order 10? In this case, you'd have a third table for the back ordered items.
@Venkat, shouldn't we use auto increment for 'productSalesId' column ?
if we use the method as shown in video. what happens when say the same procedure is triggered from two different end points ?
He is not auto-incrementing just for the sake of explanation. He is trying to create the error easily to explain the concept.
Why can't we use identity on the ProductSalesID in tblProductSales ?
Identity is automatic when specified in the initial table. It is left out on purpose to demonstrate an error. Specifically, to demonstrate the first portion of the stored procedure works, reducing the quantity available, but not recording the transaction of the sale. This is inconsistent, and one of the reasons for using Error Handling in the first place. Notice the end of the stored procedure declares and inserts @MaxProductSalesID. If we used Identity in tblProductSales, we would be able to avoid declaring the final variable. But then, there would be no error, and so there would be no lesson for the video to demonstrate.
Sir thank you so much for explaining the same in such a marvelous way.... I just want to know that do you have any paid online sessions of SQL Server too where you have provided even further details for SQL Server? If yes how to access the same kindly let me know please.....
first of all I wanna say thank u very much, you`re my fav teacher. what I wanna know if my ID column is set to automatically calculated (identity, 100,1 - beginning from 100 and increasing by one) do I still need that clause? coz as I understood, it is only because when you manually enter the iD
If he uses @identity then what's the topic error handing wouldn't be arised..
you really gone that far ;)
Thanks Sir ❤
very useful
I worship you, IT god!
Thank you sir for your valuable post
instead of calculating the ID in tblproductsales, shouldn't we just use identity (1,1) in the first place so that it automatically inserts after the previous ID?
The Videos are excellent . I just have one Basic Question . Why 'Declare' key word is used to Declare '@Stockavailable' Variable but not used for @ProductID Variable . Thanks in advance
Thank you Sir.
How the control is going to the next statement after insert statement if there isn't error in insert statement. My question is how control is going to if statement if there is an error in insert statement.
On Product sales table name of column does not match with insert command. On insert command it is @maxproductsalesid,@productid, qunatity to sell but after execution it came productsaleid, product id and qunatity sold. Could you kindly explain?
Thank you for this wonderful video. I just wrote another print statement inside the @@error0 statement to see the value of @@error. It is showing the value as 0 only. Can you please help
great
gud and nice
I followed your tutorial and tried to run the below statement.
declare @error int
insert into tblproductsales values(5,5,10)
set @error=@@ERROR
select *from tblproductsales
if (@@ERROR0)
Print 'Error Occurred'
Else
Print 'No errors'
But I'm not getting Error Occurred msg instead it's executing else statement.
Msg 2627, Level 14, State 1, Line 728
Violation of PRIMARY KEY constraint 'PK__tblprodu__1B97317E93C37F32'. Cannot insert duplicate key in object 'dbo.tblproductsales'. The duplicate key value is (5).
The statement has been terminated.
(5 rows affected)
No errors
Am not getting error. Ram is not there. i want to make an error and print Transaction rolled back.
Declare @Error int
insert into tblEmployee values('Mobile Phone',1500, 100,'ram')
if(@@ERROR 0)
Begin
print 'Transaction rolled back'
End
else
Begin
print 'Transaction Commited'
End
@@ error understood
I am getting Error while creating the Stored Procedure, could anyone pls help me out
What is "Begin Trans" & "Commit Trans"?
excellent explanation
kudvenkat Just curious, is there any good why not use RAISEERROR instead of @@Error in the insert statement.
Thanks
Tuomo Kämäräinen thanks, makes sense then
plz change your PRONUNCIATION!!!!!!!!!!
Revisiting
Thanks for educating the community.
Thanks a lot