摘要:
declare@SubTeamIdvarchar(100)set@SubTeamId='T001/T006/T100/T123/'--selectlen(@SubTeamId)--结果为19--SELECTsubstring(@SubTeamId,0,charindex('/',@SubTeamId))--结果为T001--selectright(@SubTeamId,len(@SubTeamId)-charindex('/',@SubTeamId))--结果为T006/T100/T123/while(charindex('/', 阅读全文