我尝试将此SQL语法从转换为DATE
转换为CHAR/VARCHAR
。你能提出任何建议吗?
xyz(CAST((mth||'-'||SUBSTRING(TRIM(mth_yr+50) FROM 2 FOR 2)||'-25') AS DATE), -1) /50+ 2000 ) abc123;
我尝试用DATE
代替CHAR/VARCHAR
如下,但我没有成功:
xyz(CAST((mth||'-'||SUBSTRING(TRIM(mth_yr+50) FROM 2 FOR 2)||'-25') AS char(50)), -1) /50+ 2000 ) abc123;
char(50)
应该追查(mth_yr+50)
吗?