We have a value stored in a string in a table and we need to extract 2 values from it into 2 new fields.
The field name is linkname and it contains a value like 'VALUE1-VALUE2-52'. We need to pull VALUE1 and VALUE2 out of the string and insert them into a second table.
I have tried using CHARINDEX but it doesn't work (as usual with SFMC i do not get any error message). Does anyone know how I can extract these 2 values using a query?
This should extract the first value but it fails:
select LEFT(linkname,CHARINDEX('-',linkname)-1) from mytable;
Anyone know how to extract the values? e.g - string value 'APPLE-ORANGES-52'. Return APPLE as VALUE1 and ORANGES as VALUE2.