with table1(sessionID,message,createTime)as(select 1 ,'hello' ,'2014/5/6' union allselect 1 ,'word' ,'2015/6/5' union allselect 1 ,'你好' ,'2015/7/4' union allselect 2 ,'hello' ,'同上时间' union allselect 2 ,'你好' ,'同上时间')select sessionID, replace(cast((sel