日期:2014-05-17  浏览次数:20585 次

存储过程 拆分列中的数据 并查询出来


将上面图片中的 staffId 列中的以分号分割的id, 连同其它数据一起查出来 就是查出来的时候将 staffId 中的数据 分成两列 分别显示。我不是很懂存储过程 请教了

------解决方案--------------------
select parsename(replace(staffId,';','.'),2),parsename(replace(staffId,';','.'),1)  from tb