日期:2014-05-18 浏览次数:20731 次
declare @btype table (btypeid int,bsonnum int,bfullname varchar(32),busercode varchar(32),bnamepy varchar(32),person varchar(32)) insert into @btype select 1,0,'sd','er','ert1','asg214' union all select 2,0,'sd','efsr','ert','asg' union all select 3,0,'sd','efsr1','ert','1asg' select btypeid,(bfullname +'^^^' + busercode +'^^^' + bnamepy +'^^^' +person) as result from @btype where bsonnum=0 and (bfullname +'^^^' + busercode +'^^^' + bnamepy +'^^^' +person) like '%1%' order by btypeid /* btypeid result 1 sd^^^er^^^ert1^^^asg214 3 sd^^^efsr1^^^ert^^^1asg */