DB2 SQL statemnet in AIX to update the confidential data to TST1, TST2, ... TSTn which n can be row number

I need a AIX db2 sql statement to change all the data of customer column/field to TST1, TST2, ... TSTn which n can be row number to prevent duplicate data. Many thanks.
martinlauAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PortletPaulfreelancerCommented:
would you like to provide:

the table name?
the field name?
is there any order you want imposed on the integer? (what fields are used for that order?)
is there an existing integer we could use for this? what is it's name?

& anything else you think you might have missed in the very brief question
0
momi_sabagCommented:
try something like this

update my_table t1
set t1.customer_column = (select rown
                                              from (select row_number() over(order by customer_id) as rown, customer_id
                                                         from my_table) t2
                                               where customer_id = t1.customer_id)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
martinlauAuthor Commented:
Thanks a lot for your response. I found out that my question is mislead and not correct and would like to revise as follows:

For example, I have 2 tables customer1, customer2 and both of them have customerid, customer name,phone data field, now I would like to change the customer name of both tables to mask the confidential information by changing the customer name to test1, test2 which test is the masking fixed string and n is any unique number. This moment, as I could not confirm the rows of two tables is exact same, I also need to ensure the matching between them. For example, customerid 12345 with new customer name test999 in table customer1 and we should also have customerid 12345 record with customer name test999 in table customer2. please do me a flavor to provide further advice accordingly? Thx.
0
PortletPaulfreelancerCommented:
At the very least you should provide the table definitions - you really are making this hard - for you as well as us.

Without simple facts like table names and fields names we will "invent" some, you will then need to "translate" those - and not make mistakes in the translation.

Believe me, it is easier for everyone involved if you tell us the table names and the fields names.
0
martinlauAuthor Commented:
Thanks for all experts which had given their advice to me before.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB2

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.