0
Good morning, thank you for the time in reading that question.
Problem !
Consider the registration line
ID | Nome
1 | "Fulano 1, Fulano 2, Fulano 3, Fulano 4"
I need to mount a select that when it works, returns:
ID | Nome
1 | "Fulano 1"
1 | "Fulano 2"
1 | "Fulano 3"
1 | "Fulano 4"
There are other details that I will have to turn myself still rsrsrs, because this comma was only a basic example that I gave, because I will have to face other problems like char(13), only spaces, nomenclatures "or", example:
ID | Nome
1 | "Fulano 1**char(13)** Fulano 2**char(13)** Fulano 3 **char(13)** Fulano 4"
2 | "Fulano 1 Fulano 2 Fulano 3"
3 | "Fulano 1 **ou** Fulano 2"
PS. The name quantity per record is variable, as examples
I apologize if the doubt is unclear. I thank you all.
what version of SQL Server is using?
– Ricardo Pontual
@Ricardopontual, SQL Server 2014!
– jeovani thomazini
@jeovanithomazini I suggest reading the article "Separating multi-valued text content (string split)", where you will find efficient ways to get what you need. = > https://portosql.wordpress.com/articles/
– José Diz