select replace(left(字段,CHARINDEX('/',字段) - 1 ),'http://','') from from table
select left(replace(字段,'http://',''),CHARINDEX('/',replace(字段,'http://',''))-1) from [table]
select left(replace(字段,'http://',''),CHARINDEX('/',replace(字段,'http://','')) - 1) from table 可以 select replace(left(字段,CHARINDEX('/',字段) - 1 ),'http://','') from from table不行
select left(replace(字段,'http://',''),charindex('/',replace(字段,'http://',''))-1) from 你的表或select left(aa,charindex('/',aa)-1) from (select replace(字段,'http://','') as aa from 你的表) a
from from table
from table
可以
select replace(left(字段,CHARINDEX('/',字段) - 1 ),'http://','')
from from table不行
(select replace(字段,'http://','') as aa from 你的表) a