Hi, How I can get the desired output. I want to remove the numbers till first hyphen.
create table #tmp (code1 char(20))
insert into #tmp values ('0201_AAAA_GFTYY')
insert into #tmp values ('0204_BBBB_GFTYS')
insert into #tmp values ('0204_CCCC_GFTYT')
--Desired output
Code1
AAAA_GFTYY
BBBB_GFTYS
CCCC_GFTYT