SQL Query | Split concatenated string into columns | STRING_SPLIT function

preview_player
Показать описание
This video discusses how to use the STRING_SPLIT function in sql server to split a concatenated string into separate columns.

Best Online courses -
Beginners to Python Programming

Data Science and Business Analytics with Python

Get 40% OFF of Skillshare with code FLASH40 - October 2022

Please do not forget to like, subscribe and share.

For enrolling and enquiries, please contact us at
Рекомендации по теме
Комментарии
Автор

One of the (if not the most) most underrated SQL videos I have ever seen.

ebenbrittz
Автор

After searching for many hours, I found a teacher. Thanks

hindermanrinconrubio
Автор

Thank you for the excellent explanation. I have a further complication with a concatenation string which is delimited by a series of pipes and parenthesis. With the value between the first pipe and parenthesis of varying length. The parenthesis is fixed and the distance between the close parenthesis and last pipe is also fixed.

siouxperirish
Автор

Perfect! This is exactly what I'm looking for - cross apply split function to get the F/L name in row. Thank you!

abcxyz
Автор

Wow es el metodo más rápido que he encontrado, es muy veloz y no consume recursos. Gracias!!!

carlfercho
Автор

Thank u very much, Plz put more videos like this, Really very helpful.

rprasad
Автор

nicely explained .. but row_number is an analytical function not an aggregate function

sibanipanda
Автор

1. Select value from string_split(string/column, delimiter)
2. Select value from table CROSS APPLY string_split(string/column, delimiter)
3. Select [1] AS .., [2] AS .., .. From CTE_Table
PIVOT (
Function ..
For column in ([1], [2], .. )
) AS PivotTable

inhlam
Автор

appreciate your way of teaching, really simple to understand.
Keep up the good work

amolnaranje
Автор

I have got what I was looking for .. Thanks... 😎

prashantx
Автор

i have 3 tables
01) table employee (columns are empid, empname, depid)
02) table Department ( columns are depid, dep name)
03) table salary (columns are empid, amount, month).
Q) get the empname, how don't get the salary in the month of December
please let me know the concept for this questions, how to solve

sunilmadgi
Автор

What if the name contains more than 3 name? Please reply, i need it

mnsyakir
Автор

string split function was introduced in SQL 2017, but I want to do it in SQL 2014, how can I do that? I want to split values on specific characters because my column have multiple values

shami
Автор

what if we have 4 strings to extract? what is the best function to use? I am using SQL Server 2012 and we don't have the split function.

solomong.gebrhana
Автор

Is there any another method to do this ?

english_speaking
Автор

How could I transform a single column, where each row contains a string with 6 values separated by a comma, into 6 columns?
Existing table:
Unique column
value1, value2, value3, value4, value5, value6
value A, value B, value C, value D, value E, value F
...

arturbezerra
Автор

Why you have used this approach ? When we can solve it by substring & charIndex function only

Select substring(name, 1charindex(‘, ’, name)-1) lastname, substring(name, charIndex(‘, ’, name)+1, len(name)) from table

akjay
Автор

Hello! I'm having issue with this since my Table has a Value column name and is there a way to cast a column name for the CROSS APPLY SPLIT_STRING() to different name?

shuiji
Автор

Can this be saved as a View for regular use? When I paste it into a view I get a syntax error "SQL text cannot be represented in the grid pane and diagram pane."

stuartbird
Автор

i have a column with a mix-up of 2 delimiters i.e. (;) and (|) and are not uniform in length, e.g
1 row has I=2551;A=5075;D=20120815
2 row has
and this can be longer as per the allocations but each main part is separated by (|)
i want to extract parts namely I=character.
how do i do it since they are not uniform?

petermaina