摘要:
UPDATE dbo.DEVICE_BIT_NUMBERSET code = substring(code,1,1) + substring(code,6,5) +substring(code,2,4) + substring(code,11,4) WHERE CODE LIKE '%ZNZM%';UPDATE dbo.DEVICE_BIT_NUMBERSET code = replace(code ,'-','_') WHERE CODE LIKE '%ZNZM%';SELECT substring(code,1,1) FROM 阅读全文
摘要:
INSERT INTO DEVICE_BIT_NUMBER ( DEVICE_ID, CODE )VALUES ( SELECT device_id,DEVICE_CODE FROM device_info WHERE device_code LIKE '%ZNZM%' )提示出错,正确写法去掉“values”,如下:INSERT INTO DEVICE_BIT_NUMBER ( DEVICE_ID, CODE )SELECT device_id, device_code FROM device_info a WHERE a.device_c... 阅读全文