Thank you for a great tutorial video. The fact that it is still relevance today 2 years later showing just how powerful your video is. Would it be possible for you to make a video on the output and the MergeResults table?
I was just about to say this tutorial is awesome and then you went onto the deleted and inserted tables without taking a moment to walk trough the target table after the merge. And I have learned so far that deleted and inserted tables are available only within the scope of the triggers. Which confused me further.
Thank you James! Any idea why a syntax error near the OUTPUT may come up. I did exactly what you did but somehow for the output part i get a syntax error
Because you need to create a new table or temporary table with CREATE statement which contains fields from both tables, including the field for Action. Let's say that target and source have next table structure: BusinessEntityID int, AccountNumber nvarchar(10), Name nvarchar(10), CreditRating int I need to create table #MergeResults like: Create table #MergeResults (BusinessEntityID int, AccountNumber nvarchar(10), Name nvarchar(10), CreditRating int, ActionTaken nvarchar(10), new_BusinessEntityID int, new_AccountNumber nvarchar(10), new_Name nvarchar(10), new_CreditRating int) then the last statement or OUTPUT deleted.*., $action, inserted.* into #MergeResults will work. Hope it will help someone. 😄
@@tihanapolezari7638 This did help a lot, thanks. James probably should have shown the temp #MergeResults table and also explained how the Output works to put the old and the new data in the correct columns. I haven't really worked with Triggers before so when he said 'If you've worked with Triggers before...' it was remiss not to explain for those who hadn't.
Probably the best teaching video I've seen in terms of: Visuals + well paced script + audio on point. Please keep up the good work.
Crushed it
Visuals + well paced script + audio on point
👑 Content king!
James, your explanations are lucid and thorough. Thank you for your efforts.
Thank you, PERFECT EXPLANATION !
Well explained and concise. Please do more of these type of videos, you're great at it!
Thank you for the kind words. Much appreciated. :)
Agreed
Great video, easy to understand explanation with clear examples and nice editing.
Thank you so much for this clear and concise explanation!!!!!!! 🙏
Great tutorial. I have learn a new command in t-sql.
Thank you for a great tutorial video. The fact that it is still relevance today 2 years later showing just how powerful your video is. Would it be possible for you to make a video on the output and the MergeResults table?
Simple, clear explanation. Thanks!
Very well explained!
I was just about to say this tutorial is awesome and then you went onto the deleted and inserted tables without taking a moment to walk trough the target table after the merge.
And I have learned so far that deleted and inserted tables are available only within the scope of the triggers. Which confused me further.
thank you so much, I appreciate that, and it was very useful
Amazing video ,ty 😎
Very helpful video, thank you for the explanation!
Nice explanation James
Appreciate it very much. :)
Wow, this is very neat. TY for these.
Thank you, very nicely explained.
wow what a cool tutorial, loved it!
thanks for the video
Excellent video! ❤
Excellent tutorial
Much appreciated. :)
Awesome video thanks
More advanced merge videos?!?
And more on how to leverage OUTPUT
Any Idea about 'Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "French_CI_AS" in the equal to operation.
thanks so much sir. This Solved my proble which made me busy with it since a week,,but could you tell me how to invite this query in c#?
wow, they were very quick 10 minutes :)
I liked your video, ty
thank you angel
Good job!
Hey I am facing issues in merge. Getting an error saying "Merge is not valid at this position"....
James... Missing your MSTR videos a lot. Please make videos..🙏
MicroStrategy video coming Monday
Nice presentation, but you missed the update when only CreditRating changes.
Awesome!! thanks
How to merge two stored procedures in mysql.
Do you have same in oracle?
Cool video, but the merge did not update a rating change from 1 to 2 or from 2 to 1.
Good...
Why did the result showed you the row with the id 1524 when that one doesnt exist in either of the two original tables.
hi did select on top 7 from source table, 1524 was not in top 7 but matched the values for the merge.
Thank you James! Any idea why a syntax error near the OUTPUT may come up. I did exactly what you did but somehow for the output part i get a syntax error
Because you need to create a new table or temporary table with CREATE statement which contains fields from both tables, including the field for Action.
Let's say that target and source have next table structure:
BusinessEntityID int,
AccountNumber nvarchar(10),
Name nvarchar(10),
CreditRating int
I need to create table #MergeResults like:
Create table #MergeResults
(BusinessEntityID int,
AccountNumber nvarchar(10),
Name nvarchar(10),
CreditRating int,
ActionTaken nvarchar(10),
new_BusinessEntityID int,
new_AccountNumber nvarchar(10),
new_Name nvarchar(10),
new_CreditRating int)
then the last statement or
OUTPUT deleted.*., $action, inserted.* into #MergeResults will work.
Hope it will help someone. 😄
@@tihanapolezari7638 This did help a lot, thanks. James probably should have shown the temp #MergeResults table and also explained how the Output works to put the old and the new data in the correct columns. I haven't really worked with Triggers before so when he said 'If you've worked with Triggers before...' it was remiss not to explain for those who hadn't.
Hey James How do i get this script to practise
Let me check if I can find it
Tech people can learn to actually ARTICULATE from you as they need your coaching. I work with tech people and NEVER understand their explantions.