发布网友 发布时间:2022-04-10 10:52
共3个回答
懂视网 时间:2022-04-10 15:14
ManagerId,Manager from (SELECT ROW_NUMBER() OVER(ORDER BY b.number) as orderId,substring(PrjManager,b.number,charindex(‘,‘,PrjManager+‘,‘,b.number)-b.number) AS Manager FROM [dbo].[CM_Contract] t1 inner join master.dbo.spt_values b on b.number between 1 and len(PrjManager) and substring(‘,‘+PrjManager,b.number,1)=‘,‘ where b.type=‘P‘) as t1 inner join (SELECT ROW_NUMBER() OVER(ORDER BY cntName) as orderId,substring(PrjManagerIds,b.number,charindex(‘,‘,PrjManagerIds+‘,‘,b.number)-b.number) AS ManagerId FROM [dbo].[CM_Contract] t1 inner join master.dbo.spt_values b on b.number between 1 and len(PrjManagerIds) and substring(‘,‘+PrjManagerIds,b.number,1)=‘,‘ where b.type=‘P‘) as t2 ON t1.orderId=t2.orderId
sql语句之拆分两列数据为多条
标签:sub 分享图片 color src info .com div from body
热心网友 时间:2022-04-10 12:22
如不美观是4个字段select id,cord2 from ttunion allunion allselect id,cord3 from ttunion allselect id,cord4 from ttselect id,cord1 from tt热心网友 时间:2022-04-10 13:40
没有若干好多分,急求 ,奉求了!