Joining strings in SQL Server: +, CONCAT, CONCAT_WS and STRING_AGG

Veröffentlicht am: 29 Juli 2021
auf dem Kanal: SQL Server 101
15,158
174

In this video, we will be looking at how to combine text in SQL Server.
My SQL Server Udemy courses are:
70-461, 70-761 Querying Microsoft SQL Server with T-SQL: https://rebrand.ly/querying-microsoft...
98-364: Database Fundamentals (Microsoft SQL Server): https://rebrand.ly/database-fundamentals
70-462 SQL Server Database Administration (DBA): https://rebrand.ly/sql-server-dba
Microsoft SQL Server Reporting Services (SSRS): https://rebrand.ly/sql-server-ssrs
SQL Server Integration Services (SSIS): https://rebrand.ly/sql-server-ssis
SQL Server Analysis Services (SSAS): https://rebrand.ly/sql-server-ssas-mdx
Microsoft Power Pivot (Excel) and SSAS (Tabular DAX model): https://rebrand.ly/microsoft-powerpiv...
----
My Excel for PC courses are:
Beginner to Excel - https://rebrand.ly/microsoft-excel-sp...
Intermediate to Expert Advanced - https://rebrand.ly/microsoft-excel-ex...
Power Table, Get and Transform and Power Pivot - https://rebrand.ly/visualizing-data-e...
VBA macros for Excel - https://rebrand.ly/excel-vba-pc
----
Joining strings is very easy in SQL - you can just use a + sign.
However, there are advantages to using CONCAT, if you are joining a string to a NULL.
Need a separator between string items? Then is when you can use CONCAT_WS.
However, what if you want to join together strings in multiple rows into one big string? You can use STRING_AGG to do this, and include a separator as well if you wish.


Auf dieser Seite können Sie das Online-Video Joining strings in SQL Server: +, CONCAT, CONCAT_WS and STRING_AGG mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer SQL Server 101 29 Juli 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 15,158 Mal angesehen und es wurde von 174 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!