参阅用户手册中concat的说明,第二个参数只能是字符串或字符。你在计算concat(concat(string(yearOfRegistration),"."),string(monthOfRegistration))这个时,第二个参数值是string(monthOfRegistration),这个是字符串向量了,所以报错。可试试下面代码:
select string(yearOfRegistration) + "." + string(monthOfRegistration) + ".01" as newcat from tb