2019-05-21-拼接字符串

DateName(year,ire.CFRepDate)||'-'||DateName(month,ire.CFRepDate) as repDate_year,

------>2019-2 的形式

上面这句注意两点:

1、获取年月日  使用dataname    year  month  day ...

2、将年月进行拼凑可使用 || 去替代+  

你可能感兴趣的:(2019-05-21-拼接字符串)