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
Explained it so well that my baby Son could understand it. Thanks a million
Great video, very good at explaining XML Path and STUFF separately.
Glad it was helpful!
after lots of search i got this video,that great thank you
Thank you
Well explained thank you soo much for sharing.. 👍
Thank you!
great video; Thank you! excellent explanation.
Thank you
good explanations, thanks for sharing this video I found it very helpful.
Glad it was helpful!
Very nice logic used...👍
Thank you!
Very easy to understand. Thank you
Thank You
Awesome video explanation!
Thank you!
Very useful stuff thank you
Thank you for sharing!
Thank you
Great session!
Here, directly we can use strin_aggrigate() function
You are correct. String_AGG function does not work for some older versions of SQL Server where this approach can be used.
Can you please tell how to write stuff with different data types and columns for different tables?
Thanks!
You are our first Super Thanks! Thank you!!!
I think Oracle LIST_AGG Function also works in same way, merging rows to comma separated values
Yes, it is similar 👍
Yes ..its similar
Good one 🙏
Thank you !
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
Thank you so much.
thank you
Glad it was helpful
can we also use STRING_AGG function instead of this?
Yes
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
can this also be done from column to row? HELP ME PLESSS. THANK YOU 🥲
String_Agg would have been easy way to solve it.
Yes. This is for SQL Server versions where STRING_AGG does not work.