sql语句转换和拼接

SELECT TOP 1000 [ID]
,[PracticalTraining]
,[FundID]
,[TradeName]
,[TradePrice]
,[TradeProportion]
,[StatisticsDate]
,'2019'+right(convert(char(23),[StatisticsDate],21),19)
FROM [Vamlab_V1.0_TradeCenter].[dbo].[Vam_TradeInvestment] --where StatisticsDate < '2018-12-31'

把2019年之前的日期改为2019年,先查询并拼接成串显示

posted @ 2019-11-12 11:29  太阳风暴  阅读(215)  评论(0编辑  收藏  举报