select substring(col,charindex('(',col)+1,charindex(')',col)-charindex('(',col)-1) col from tb
declare @t table (colname varchar(20)) insert into @t select 'adfdfsd(ab cc)' union all select 'adfdfsd(cs ac)' union all select 'adfdfsd(afe cdfc)'select parsename(replace(replace(replace(colname,'(','.'),')','.')+'1',' ','.'),3), parsename(replace(replace(replace(colname,'(','.'),')','.')+'1',' ','.'),2) from @t
select substring(col,charindex('(',col)+1,charindex(')',col)-charindex('(',col)-1) as col from tb
select substring(col,charindex('(',col)+1,charindex(')',col)-charindex('(',col)-1) col
from tb
declare @t table (colname varchar(20))
insert into @t
select 'adfdfsd(ab cc)' union all
select 'adfdfsd(cs ac)' union all
select 'adfdfsd(afe cdfc)'select
parsename(replace(replace(replace(colname,'(','.'),')','.')+'1',' ','.'),3),
parsename(replace(replace(replace(colname,'(','.'),')','.')+'1',' ','.'),2)
from @t
substring(col,charindex('(',col)+1,charindex(')',col)-charindex('(',col)-1) as col
from
tb