我在表中有列,其值存储为
HX CAP SCR GD5 1/2-13 X 3 3/4
HX CAP SCR GD8 1/2-13 X 4 1/4
HX CAP SCR Grade 5 1/2-13 X 5 1/2
HX CAP SCR Grade 8 1/2-13 X 6 1/2
现在,我需要将这些值存储到另一个表中,例如
CATEGORY SIZE
HX CAP SCR GD5 1/2-13 X 3 3/4
HX CAP SCR GD8 1/2-13 X 4 1/4
HX CAP SCR Grade 5 1/2-13 X 5 1/2
HX CAP SCR Grade 8 1/2-13 X 6 1/2
我需要将类别与大小值分开。
This is what I have so far, but it is not working the GD5 and GR8 are part of the category column.
SELECT CustDesc
,'??????' as Category
,SUBSTRING(CustDesc,PatIndex('%[0-9.-]%', CustDesc),8000) as Size
FROM [##CustParts]
上述查询的结果
CustDesc Category Size
HX CAP SCR GD5 1/2-13 X 3 ?????? 5 1/2-13 X 3
请让我知道执行此操作的查询是什么......