SELECT substr(CAST(1000+YEAR(reportdate)-1911 AS CHAR(4)),-3),
substr(CAST(100+MONTH(reportdate) AS CHAR(3)),-2) ,
substr(CAST(100+DAY(reportdate) AS CHAR(3)),-2),
substr(CAST(1000+YEAR(reportdate)-1911 AS CHAR(4)),-3) ||
substr(CAST(100+MONTH(reportdate) AS CHAR(3)),-2) ||
substr(CAST(100+DAY(reportdate) AS CHAR(3)),-2)
FROM Totfa
WHERE ReportMonth = 10102
結果:
(expression) (expression)_1 (expression)_2 (expression)_3
101 03 05 1010305
沒有留言:
張貼留言