sql server中的怎么把数值型转换为字符串
①select cast(字段 as varchar) from 表名
②select convert(varchar(50),字段) from 表名
标签: SQL
select * from ppegeneral
--update ppegeneral set itempara=convert(varchar(50),(convert(numeric(6,2),itempara)-1))
where techno='du' and itemname like '%镀铜电流密度(ASF) %'
and pdctno in (select max(pdctno) from ppeflow group by left(pdctno,7))
and pdctno in (select pdctno from mktdelivery where convert(char(10),indate,120)>'2017-08-01')
and itempara<>'/ ' and itempara not in (' ','/','0')
and left(pdctno,1)>'8'
order by itempara desc
select pdctno into #ppe01 from ppegeneral
--update ppegeneral set itempara=convert(varchar(50),(convert(numeric(6,2),itempara)-1))
where techno='du' and itemname like '%镀铜电流密度(ASF) %'
and pdctno in (select max(pdctno) from ppeflow group by left(pdctno,7))
and pdctno in (select pdctno from mktdelivery where convert(char(10),indate,120)>'2017-08-01')
and itempara<>'/ ' and itempara not in (' ','/','0')
and left(pdctno,1)>'8'
①select cast(字段 as varchar) from 表名
②select convert(varchar(50),字段) from 表名
convert(varchar(50),(convert(numeric(6,2),itempara)-1))