I save in a field in Mysql the next String:
Employee_ID | Department |
---|---|
130434 | IT / Infraestructure / HW |
But I need to split in different columns separated by “/” like This:
Employee_ID | Column A | Column B | Column C |
---|---|---|---|
130434 | IT | Infraestructure | HW |
Could you help me please?
Separated in different columns a string
There is no SQL function for this.
If you normally want the text split up into 3 columns, do so when ingesting the data; have 3 columns in the table.
If there are exactly 3 columns in all cases, use SUBSTRING_INDEX(...)
.