yemets63 |
ну да, логично
CREATE OR REPLACE Function IntToHex(mInt varchar2 default '0') RETURN VARCHAR2 IS
-- select inttohex('16384') from dual
mHex Varchar2(7);
BEGIN
select ('#'||replace(to_char(mInt,'XXXXX'),' ','0')) into mHex from dual;
return mHex;
END IntToHex; |
I thought Ы pointed you to use of 0 in format and I pointed out FM format modifier. So why you are using replace:
SQL> set serveroutput on
SQL> declare
2 mHex Varchar2(7);
3 begin
4 mHex := '#' || to_char(16384,'FM0XXXXX');
5 dbms_output.put_line('mHex is "' || mHex || '"');
6 end;
7 /
mHex is "#004000"
PL/SQL procedure successfully completed.
SQL>
SY.
P.S. 2 _Халявщик_: Желательно без слов для связки слов.