如:
create table a
(
 a char(10)
)insert into a
select 'aa_bb'
union
select 'aa_cc'
union
select 'aa'
union
select 'a_b_c'select * from a
我要的结果是
aBC
aa
aaBb
aaCc
就是遇到'_'后面的第一个字段变成大写谢谢... ....

解决方案 »

  1.   

    --参考
    http://community.csdn.net/Expert/topic/4974/4974681.xml?temp=.4806024
      

  2.   

    我给你一个直接的,测试通过,你的char害得我调了好一会儿 
    SELECT  (case when charindex('_',a)<=0 then a else left(a,charindex('_',a)-1)+upper(replace(right(rtrim(a),len(a)-charindex('_',a)),'_','')) end) from a