Want to mask all the rows in a column at once?

R

RG007

I want to mask all the data in the rows of a column using a character
i want suppose "x" for all the characters and "9'" for all the numbers
if the rows contain digits.
Right now I am having a code which goes to every character and checks
whether it is a number or alphabet and change to the required one.
But I want the code to be able to change the string at once to xxxxxxx
or 999999?
How to modify?
 
R

Roedy Green

Right now I am having a code which goes to every character and checks
whether it is a number or alphabet and change to the required one.
But I want the code to be able to change the string at once to xxxxxxx
or 999999?
How to modify?

You will need a char by char loop. If you found a method, that is what
it woud do inside.
 
V

Venky

If data is in the database, then you can do that in a single SQL
statement (or a single JDBC call). Otherwise I can't think of any such
java function which can modify all the rows at once.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top