Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Problem with using NVL Function in SQL
paul.izzo_at_mosca-ag.com:
Assuming you have your 'account' column as varchar2(8) NULL and you want eight zeros when null:
SQL> SELECT LPAD(NVL(NULL,'0'),8,'0') account from dual;
ACCOUNT
Cheers. Received on Wed Jan 26 2005 - 08:56:18 CST