SQL Query | How to convert data from rows into comma separated single column | FOR XML PATH | STUFF

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ต.ค. 2024
  • This video explains the SQL Query using FOR XML PATH and STUFF functions to convert data from rows into a comma separated column value.
    You can check out the SQL Query here -
    know-star.blog...
    Please do not forget to like, subscribe and share.
    For enrolling and enquiries, please contact us at
    Website - knowstar.org/
    Facebook - / knowstartrainings
    Linkedin - www.linkedin.c...
    Email - learn@knowstar.org

ความคิดเห็น • 42

  • @anthonyjones9528
    @anthonyjones9528 3 ปีที่แล้ว +1

    Explained it so well that my baby Son could understand it. Thanks a million

  • @jayjfreedman
    @jayjfreedman ปีที่แล้ว +1

    Great video, very good at explaining XML Path and STUFF separately.

  • @archananerkar3113
    @archananerkar3113 2 ปีที่แล้ว

    after lots of search i got this video,that great thank you

  • @mvicky9025
    @mvicky9025 3 ปีที่แล้ว +1

    Well explained thank you soo much for sharing.. 👍

  • @abdulk6311
    @abdulk6311 3 ปีที่แล้ว +1

    great video; Thank you! excellent explanation.

  • @matts8911
    @matts8911 ปีที่แล้ว

    good explanations, thanks for sharing this video I found it very helpful.

  • @Melodychoice601
    @Melodychoice601 3 ปีที่แล้ว +1

    Very nice logic used...👍

  • @viewableorchid6464
    @viewableorchid6464 ปีที่แล้ว

    Very easy to understand. Thank you

  • @vishaljhaveri7565
    @vishaljhaveri7565 9 หลายเดือนก่อน

    Awesome video explanation!

  • @niranjanbalajisingh6726
    @niranjanbalajisingh6726 2 ปีที่แล้ว

    Very useful stuff thank you

  • @kristyowens2284
    @kristyowens2284 3 ปีที่แล้ว +1

    Thank you for sharing!

  • @Beyondhorizons-i5z
    @Beyondhorizons-i5z 3 ปีที่แล้ว

    Great session!

  • @rajugrg2493
    @rajugrg2493 2 ปีที่แล้ว +2

    Here, directly we can use strin_aggrigate() function

    • @LearnatKnowstar
      @LearnatKnowstar  ปีที่แล้ว

      You are correct. String_AGG function does not work for some older versions of SQL Server where this approach can be used.

  • @kavipriya2823
    @kavipriya2823 ปีที่แล้ว

    Can you please tell how to write stuff with different data types and columns for different tables?

  • @FrankBadillo
    @FrankBadillo ปีที่แล้ว

    Thanks!

    • @LearnatKnowstar
      @LearnatKnowstar  ปีที่แล้ว

      You are our first Super Thanks! Thank you!!!

  • @piyushjoshi8038
    @piyushjoshi8038 3 ปีที่แล้ว +1

    I think Oracle LIST_AGG Function also works in same way, merging rows to comma separated values

  • @elite_broly7590
    @elite_broly7590 ปีที่แล้ว

    Good one 🙏

  • @briandennehy6380
    @briandennehy6380 2 ปีที่แล้ว

    Another good video. Could I just suggest maybe formatting your code a bit better so that it's a bit easier to read and understand

  • @itaydiaz
    @itaydiaz 7 หลายเดือนก่อน

    thank you

  • @viewableorchid6464
    @viewableorchid6464 ปีที่แล้ว

    can we also use STRING_AGG function instead of this?

  • @landchennai8549
    @landchennai8549 2 วันที่ผ่านมา

    declare @Table table (Id int,[Name] varchar(32))
    insert into @Table values (1,'Prasad'),(1,'Priyan'),(2,'Askok'),(2,'Kumar')
    select Id , STRING_AGG([Name],',') as Fullname
    from @Table
    group by Id

  • @katesantos2343
    @katesantos2343 ปีที่แล้ว

    can this also be done from column to row? HELP ME PLESSS. THANK YOU 🥲

  • @KiranPatil-zw8tm
    @KiranPatil-zw8tm ปีที่แล้ว

    String_Agg would have been easy way to solve it.

    • @LearnatKnowstar
      @LearnatKnowstar  ปีที่แล้ว

      Yes. This is for SQL Server versions where STRING_AGG does not work.