select top 1 text from hclog where LEFT(LTRIM(text),12)='BuildInfoGrp' order by id 
ID 创建索引??

解决方案 »

  1.   

    select top 1 text from hclog where charindex('BuildInfoGrp',text)=0 order by id 
      

  2.   


    create table 菜鸟1123(id int , [text] text)
    delete from 菜鸟1123
    insert into 菜鸟1123
    select 1,'ddddddddd' union all 
    select 2,'ddddddddd' union all 
    select 3,'ddddddddd' union all 
    select 4,'ddddBuildInfoGrpddddd' union all 
    select 5,'ddddBuildInfoGrpddddd' union all 
    select 6,'ddddddddd'
    select  * from 菜鸟1123 where charindex ('BuildInfoGrp',text)>0 order by id 
      

  3.   

    Mark,希望楼主把反馈贴上来。