Re: Mask Account Number in Query

From: T <t_at_yahoo.com>
Date: Mon, 12 Sep 2005 12:35:05 +0200
Message-ID: <dg3lo6$cid$1_at_ss405.t-com.hr>


try http://www.techonthenet.com/oracle/functions/ good luck!!

"DA Morgan" <damorgan_at_psoug.org> wrote in message news:1126204621.900502_at_yasure...
> Malcolm Dew-Jones wrote:
>> brett.birschbach_at_cellcom.com wrote:
>> : In response to DA Morgan, That works fine if I know the length of the
>> : account number. However, it doesnt work with varying lengths. The
>> : replacement would be hardcoded to a certain number of asterisks, so in
>> : my previous example, the accounts would show as
>>
>> : 123456 -> ******3456
>> : 1234567890 -> ******7890
>>
>> Oracle SQL has lots of string manipulation functions. (Heck I think that
>> even generic SQL has these functions.)
>>
>> One basic idea is to use one of those functions to find the length of the
>> string, and then subtract four from that length, and then replace that
>> many characters at the start of the string with the * character.
>
> Exactly. A little INSTR ... a little LPAD ... and you're in business
> in a matter of a few minutes.
> --
> Daniel A. Morgan
> http://www.psoug.org
> damorgan_at_x.washington.edu
> (replace x with u to respond)
Received on Mon Sep 12 2005 - 12:35:05 CEST

Original text of this message