select 
       substr(t.产品名||t.产品型号, 1, Instr(t.产品名||t.产品型号, ' ', 1) - 1)||'   '||trim(substr(t.产品名||t.产品型号,Instr(t.产品名||t.产品型号, ' ', 1)+ 1))
from ta1 t

解决方案 »

  1.   

    楼上的可能没看明白吧,好象说的是在一个字段里吧,我这个可以的,呵呵
    select substr(pro,1,instr(pro,' ')-1)  --截取名称
    ||'   '||                             --加3个空格
    substr(pro,instr(pro,' ',-1),'4')   --截取型号
    from ta1
      

  2.   

    select 
     substr( pro, 1, Instr(pro, ' ') - 1)||'   '||trim( substr( pro, Instr(pro, ' ')))
    from t
    格式化可以用:
     rpad( substr( pro, 1, Instr(pro, ' ') - 1), 10) || trim( substr( pro, Instr(pro, ' ')))
    or:
     rpad( substr( pro, 1, Instr(pro, ' ',-1) ), 10) || substr( pro, Instr(pro, ' ', -1) +1)