我目前正在使用CASE函数,如下所示: when length(to_char(num_field)) = 4 then CONCAT("0000000000",to_char(num_field))
when length(to_char(num_field)) = 5 then CONCAT("000000000",to_char(num_field))when length(to_char(num_field)) = 6
DATE_TRAN FROM FAKE_CUST F WHERE SELECT 1 from FAKE_CUST where (TO_CHAR(DATE_TRAN,'MM') = TO_CHAR(F.DATE_TRAN,'MM')-1 OR TO_CHAR(DATE_TRAN,'MM') = TO_CHAR(F.DATE_TRAN,'MM')) AND