Home » SQL & PL/SQL » SQL & PL/SQL » Masking fixed length flat file
icon6.gif  Masking fixed length flat file [message #256794] Mon, 06 August 2007 13:14 Go to next message
Messages: 34
Registered: May 2007
I have a typical requirement.
I have a flat file which is a fixed length one.
In this flat file from 3rd position to 21st position (i.e 19 characters) is allocated for the acc #. The acc # may not be of full length. The length can vary from 10-19 characters. the data fields are fixed. if the account number doesn't fill all the 19 positions then you will have blanks.
Hope this clarify my problem in more detail

Now my requirement is that I need to replace this acc # in such a way that leaving the first 6 digits and last 4 digits the remaining digits should be 0.

xx123456789108738 xxxxx
xx5734567893333333 xxxx

xx123456000008738 xxxxx
xx5734560000003333 xxxxx

Thanks to all for help
Re: Masking fixed length flat file [message #256797 is a reply to message #256794] Mon, 06 August 2007 13:26 Go to previous message
Michel Cadot
Messages: 65079
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Does not substr function fit your requirement?

Previous Topic: MAIL
Next Topic: Insert into table
Goto Forum:

Current Time: Thu Jul 20 22:18:13 CDT 2017

Total time taken to generate the page: 0.16714 seconds