我在为 SSIS 转换修剪连接键时遇到了一些麻烦。
SELECT year_time, substring(rtrim(cast(region_code+county_code+district_code as varchar(100)), 5,4)as DR, rtrim(ltrim(T1.district_name)) as 'DNR', SUM(CAST(K12 AS INT)) AS 'TR'
FROM Database_Table
GROUP BY year_time, region_code+county_code+district_code, district_name
order by year_time, district_code_raw, district_name_raw
我收到一个错误,我的 rtrim 函数需要 1 个参数。我相信错误是在串联上。