jbliss02
2/5/2018 - 6:09 PM

sql server - remove preceding zeros

sql server - remove preceding zeros

SUBSTRING(s.materialNumber, PATINDEX('%[^0]%', s.materialNumber + '.'), LEN(s.materialNumber)) = SUBSTRING(sap.SAP_MATERIAL_NUM , PATINDEX('%[^0]%', sap.SAP_MATERIAL_NUM  + '.'), LEN(sap.SAP_MATERIAL_NUM ))