Quantcast
Channel: SQL Server Reporting Services
Viewing all articles
Browse latest Browse all 1418

Splitting a varchar variable into several varchars separated by comma

$
0
0

Hello,

I have a varchar variable in SQL SERVER set like this:

@Resultat='2001:1, 2001:2, 2018:1, 2018:2'

I want to have this variable splitted into 4 varchar variables as follows:

2001:1

2001:2

2018:1

2018:2

My sql server doesn't support the function STRING_SPLIT and I don't have rights to create a table or a function.

How can I achieve this ?

Thanks in advance.


Viewing all articles
Browse latest Browse all 1418

Trending Articles