Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ストアド関数に値をTEXTとして返したいのですが、なりたいのですが0001、1
0001
1
私はこのコードフラグメントを持っています:
DECLARE _RESTRICTEDROUTE DECIMAL(4,0); RETURN(_RESTRICTEDROUTE);
私は試した
RETURN(CAST(_RESTRICTEDROUTE AS TEXT));
しかし失敗しました。
を使用しLPAD()ます。
LPAD()
これは機能するはずです:
RETURN(LPAD(_RESTRICTEDROUTE, 4, "0"))