Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Problem with using NVL Function in SQL

Problem with using NVL Function in SQL

From: Carlos <miotromailcarlos_at_netscape.net>
Date: 26 Jan 2005 06:56:18 -0800
Message-ID: <1de5ebe7.0501260656.5fd1777@posting.google.com>


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



00000000

Cheers. Received on Wed Jan 26 2005 - 08:56:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US