Hi again,
I have the need to extract 2 pieces of information from a string
I have the following string
803-0052-P-11-BR
I need to get the 11 as the size and
I need to get the BR as the color
The strin can vary in lengt startign with the size so it could be
803-0052-P-8-T or 803-0052-P-11-BR
I need a way to get what is in between the 3rd and 4th dash as the size and what is after the 4tgh dash as the color regardless of lenght of each of thos elements.
Any suggestions?
This is what I have so far
Thanks in advance
I have the need to extract 2 pieces of information from a string
I have the following string
803-0052-P-11-BR
I need to get the 11 as the size and
I need to get the BR as the color
The strin can vary in lengt startign with the size so it could be
803-0052-P-8-T or 803-0052-P-11-BR
I need a way to get what is in between the 3rd and 4th dash as the size and what is after the 4tgh dash as the color regardless of lenght of each of thos elements.
Any suggestions?
This is what I have so far
Code:
SELECT
I.ITEM,
I.DESCRIPTION,
LEFT(I.DESCRIPTION,1) AS 'GENDER'
FROM
ITEM I WITH(NOLOCK)
WHERE
I.COMPANY = '073'
Thanks in advance