SELECT NEWID(),a.RYBH,NULL,NULL,SUBSTRING(a.ZCZY, b.number, CHARINDEX(',', a.ZCZY+',', b.number)-b.number) AS Specialty,a.ZCZY
FROM DataCenter.dbo.XXZX_YPTQY_T_QY_ZYJSRYZCXX a JOIN MASTER.dbo.spt_values b ON CHARINDEX(',', ','+a.ZCZY, b.number) = b.number
WHERE b.[type]= 'P'
sql以某个字段的逗号分开成多条数据
最新推荐文章于 2024-01-03 10:35:35 发布