2 Scenarios where SAS merge and joins results are not same

Поделиться
HTML-код
  • Опубликовано: 20 янв 2025

Комментарии • 16

  • @Toloo.
    @Toloo. 2 года назад

    I have never seen the teaching like this, amazing, fabulous, elegent, fantastic, and Thank you so much for sharing your knowledge, I would like to subscribe to your channel one million times, plz go ahead

    • @kiranvenna
      @kiranvenna  2 года назад

      Thank you for your kind words.

  • @Klisania_A
    @Klisania_A 3 года назад +1

    Thank you for sharing.
    It was very helpful to clear the merge concept with same variables.
    Faced this with three table merge and when I was trying to do same step in Python didn't happened.
    So SAS was very handy to get the data with merge.

  • @dougdame6706
    @dougdame6706 3 года назад +4

    In my experience, a many-to-many merge in SAS almost always is a signal that there's data problems. Here, for example, age for ID=2 in the left-hand dataset is 10 or 20 ... well, which is it? And in the right-hand dataset, ID=2 has a salary of 5000 ... or 6000 or 7000. At any given point in time, person-ID=2's salary has to be one value. So probably/possibly, the right dataset has a date field that should have been used as a filter of some sort, and the programmer didn't know that, or didn't do it.
    I always interpret a SAS-note warning of a many-to-many merge as saying "Whoa Dummy ... you don't know your data as well as you think you do ... something needs fixing here."
    Offhand it's hard to envision a situation where what happens in a SAS many-to-many merge is what you WANT to happen, particularly in regard to how it carries (retains) field values into the "extra rows".
    But other than that, I strongly prefer SAS merges to SQL joins. You have clear control with the IN= vars, and the notes telling you the input and output counts of rows and fields is a tremendous help in auditing that what's happening is what you intended and expected.

    • @kiranvenna
      @kiranvenna  3 года назад

      Excellent points. I agree with you on all points.

  • @mkrishna2593
    @mkrishna2593 Год назад

    But in many to many join, you selected only salary column of 2nd table. Why cannot we select * from 2nd table also?

    • @kiranvenna
      @kiranvenna  Год назад

      Please check out this video to understand in detail. ruclips.net/video/IrgwvhYebww/видео.html

  • @GKrishnna-c2b
    @GKrishnna-c2b 3 года назад +1

    As USUAL nice explanation thanks sirr

  • @shivampathak5546
    @shivampathak5546 2 года назад

    You doing a great work 😊

  • @akshayaseetharaman5687
    @akshayaseetharaman5687 Год назад

    Thankyou so much sir.

  • @vamsikrishnakandagatla7937
    @vamsikrishnakandagatla7937 6 месяцев назад

    Sir thank you for sharing but to do proper merging or joining we need as first explained id, age ,salery 3 records but not should not show the age proper output

    • @kiranvenna
      @kiranvenna  6 месяцев назад

      Hi, I did not completely understand your question.

    • @vamsikrishnakandagatla7937
      @vamsikrishnakandagatla7937 6 месяцев назад

      I am asking that if the loglines are there how it will merge... Please

  • @crystalmaiden7590
    @crystalmaiden7590 3 года назад

    Very helpful 👌

  • @bharathkumarkambala5575
    @bharathkumarkambala5575 3 года назад

    Very helpful

  • @9356079
    @9356079 3 года назад

    Thank ypu