请教一个SQL语句的写法
GB/T 10361-1989 如何取去掉中间的 "/T "得到的值?
即得到 GB 10361-1989
------解决方案--------------------select replace( 'GB/T 10361-1989 ', '/T ', ' ')
------解决方案--------------------declare @aa varchar(40)
select @aa= 'GB/T 10361-1989 '
print replace(@aa, '/T ', ' ')
------解决方案--------------------declare @s as varchar(20)
set @s = 'GB/T 10361-1989 '
set @s = replace(@s, '/T ', ' ')
print @s
/*
GB 10361-1989
*/
------解决方案--------------------declare @s as varchar(20)
set @s = 'GB/T 10361-1989 '
set @s = replace(@s, '/T ', ' ')
print @s
/*
GB 10361-1989
*/
declare @s as varchar(20)
set @s = 'GB/T 10361-1989 '
set @s = substring(@s,1,2)+substring(@s,5,len(@s)-4)
print @s
/*
GB 10361-1989
*/