0

I have a list of names where the names and surnames of the users are separated by commas (surname1, surname2, name1, name2) the question is how do I separate each of those names in their respective columns when I make a select?

What I did

select
 nombre_APELLIDO AS 'Nombre Completo'
from
[FUN2020]

I get

enter image description here

but I don't know how to write an output where I get each of the columns for each word.

maniat1k
  • 440
  • 2
  • 6
  • 14
  • Sounds like the answer is through the use of CHARINDEX() – jw11432 Oct 15 '20 at 19:18
  • 1
    Sorry, but looks like you didn't do your home work :) – Fabio Oct 15 '20 at 19:33
  • @fabio you're right:) that links looks like what I needed thanks! – maniat1k Oct 15 '20 at 19:36
  • If you have an application which consumes this database query, then best approach would be to load data to that application as it is and let programming language of your choice do the job it was designed for - **right tool for the job** – Fabio Oct 15 '20 at 19:36

0 Answers0