SQL - Merge

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • This video covers how to use the merge statement with t-sql.

КОМЕНТАРІ • 51

  • @safkaify7875
    @safkaify7875 Місяць тому

    Probably the best teaching video I've seen in terms of: Visuals + well paced script + audio on point. Please keep up the good work.

  • @chriskeo392
    @chriskeo392 Рік тому +5

    Crushed it
    Visuals + well paced script + audio on point
    👑 Content king!

  • @ottmiller4028
    @ottmiller4028 3 роки тому +3

    James, your explanations are lucid and thorough. Thank you for your efforts.

  • @cidaiha
    @cidaiha Рік тому +2

    Thank you, PERFECT EXPLANATION !

  • @Circumvenscion
    @Circumvenscion 2 роки тому +2

    Well explained and concise. Please do more of these type of videos, you're great at it!

  • @CrazySw3de
    @CrazySw3de 3 роки тому +2

    Great video, easy to understand explanation with clear examples and nice editing.

  • @apoorvavanaparthi8853
    @apoorvavanaparthi8853 7 місяців тому

    Thank you so much for this clear and concise explanation!!!!!!! 🙏

  • @RC-ql5lp
    @RC-ql5lp 3 роки тому +1

    Great tutorial. I have learn a new command in t-sql.

  • @Thle009
    @Thle009 Рік тому +1

    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?

  • @anawadtom6011
    @anawadtom6011 3 роки тому +1

    Simple, clear explanation. Thanks!

  • @sumit-visatotravel8780
    @sumit-visatotravel8780 5 місяців тому

    Very well explained!

  • @iliashterev38
    @iliashterev38 7 місяців тому

    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.

  • @abbasmuhammed214
    @abbasmuhammed214 2 місяці тому

    thank you so much, I appreciate that, and it was very useful

  • @RainSoundsToConcentrate
    @RainSoundsToConcentrate 9 місяців тому

    Amazing video ,ty 😎

  • @bobocrazvan-marius801
    @bobocrazvan-marius801 2 роки тому

    Very helpful video, thank you for the explanation!

  • @maheshbabu6925
    @maheshbabu6925 2 роки тому

    Nice explanation James

  • @abcxyz6606
    @abcxyz6606 3 роки тому

    Wow, this is very neat. TY for these.

  • @mohammadhaque1873
    @mohammadhaque1873 2 роки тому

    Thank you, very nicely explained.

  • @makeittrades5750
    @makeittrades5750 3 роки тому

    wow what a cool tutorial, loved it!

  • @riccarrasquilla379
    @riccarrasquilla379 Місяць тому

    thanks for the video

  • @emrc9777
    @emrc9777 Рік тому

    Excellent video! ❤

  • @Raj-ph1py
    @Raj-ph1py 3 роки тому

    Excellent tutorial

  • @thomasjordan454
    @thomasjordan454 2 роки тому

    Awesome video thanks

  • @chriskeo392
    @chriskeo392 Рік тому

    More advanced merge videos?!?
    And more on how to leverage OUTPUT

  • @sayfriseup172
    @sayfriseup172 Рік тому

    Any Idea about 'Cannot resolve the collation conflict between "Latin1_General_CI_AS" and "French_CI_AS" in the equal to operation.

  • @rntech4541
    @rntech4541 Рік тому

    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#?

  • @romeokamil
    @romeokamil 2 роки тому

    wow, they were very quick 10 minutes :)

  • @fo1487
    @fo1487 2 роки тому

    I liked your video, ty

  • @Renad-bm3ph
    @Renad-bm3ph 3 роки тому

    thank you angel

  • @dmitryvlasov931
    @dmitryvlasov931 3 роки тому

    Good job!

  • @DeekshaKatiyar-wn7ub
    @DeekshaKatiyar-wn7ub Рік тому

    Hey I am facing issues in merge. Getting an error saying "Merge is not valid at this position"....

  • @rapo107
    @rapo107 3 роки тому

    James... Missing your MSTR videos a lot. Please make videos..🙏

    • @JamesOliver
      @JamesOliver  3 роки тому

      MicroStrategy video coming Monday

  • @johnli6706
    @johnli6706 Рік тому

    Nice presentation, but you missed the update when only CreditRating changes.

  • @israell9320
    @israell9320 3 роки тому

    Awesome!! thanks

  • @LearnSalesforceWithPiyush
    @LearnSalesforceWithPiyush 2 роки тому

    How to merge two stored procedures in mysql.

  • @sreelakshmia6762
    @sreelakshmia6762 3 місяці тому

    Do you have same in oracle?

  • @FloKluge
    @FloKluge Рік тому

    Cool video, but the merge did not update a rating change from 1 to 2 or from 2 to 1.

  • @TheSomestuffs
    @TheSomestuffs 3 роки тому

    Good...

  • @henrygrip8486
    @henrygrip8486 3 роки тому

    Why did the result showed you the row with the id 1524 when that one doesnt exist in either of the two original tables.

    • @romeokamil
      @romeokamil 2 роки тому

      hi did select on top 7 from source table, 1524 was not in top 7 but matched the values for the merge.

  • @PedramRasti
    @PedramRasti 3 роки тому

    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

    • @tihanapolezari7638
      @tihanapolezari7638 2 роки тому +2

      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. 😄

    • @MpT_Head
      @MpT_Head Рік тому

      @@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.

  • @harshalpatel555
    @harshalpatel555 3 роки тому

    Hey James How do i get this script to practise

  • @thedatastoryteller5692
    @thedatastoryteller5692 3 роки тому

    Tech people can learn to actually ARTICULATE from you as they need your coaching. I work with tech people and NEVER understand their explantions.