Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: including leading zero SS#
SQL> variable cli_ssn varchar2 (9)
SQL> execute :cli_ssn:= '000000000'
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.20
SQL> select translate (to_char (to_number (:cli_ssn), 'FM099,99,99999'),
2 ',', '-') from dual;
TRANSLATE(TO_
1 row selected.
Is that usable?
Martin
rmartes wrote:
>
> I want to include leading zeros when displaying social security numbers.
> this is what I have so far:
>
> SUBSTR( cli.ssn, 1, 3 )||'-'||SUBSTR( cli.ssn, 4, 2 )||'-'||SUBSTR( cli.ssn,
> 6, 4 ) soc_sec
>
> Thanks
Received on Sun Jul 01 2001 - 14:10:44 CDT
![]() |
![]() |