I'm trying to replace the first of a certain character in my SQL query. In my case I'm trying to replace the first " - " by a " ; ", but not the second
This is a simplified version of the query i've tried, but it replaces both "-"
SELECT REPLACE (xColumn, '-',';')FROM xTable
Example 1:
Original data: COMP-LAP-0001
My result: COMP;LAP;0001
Expected result: COMP;LAP-0001
Example 2:
Original data: COMP-0001
My result: COMP;0001
Expected result: COMP;0001