Hi there,
I am pretty new to databases and DB2 in particular. I have this problem: there is an already populated db and I need to perform a certain operation on each reacord of a table. The operation consists in modifying the content of a VARCHAR() column, basically to remove some spaces in the records.
For example, suppose this is the table:
Now, what I want is to remove the leading spaces from the the FULL_NAME columns and also to remove exceeding spaces between the name and surname.
Of course, I know how to do it in Java, but I want to know if I can do it in a more performant way using something like stored-procedures.
Please, point to any relevant page/tutorial/example.
Thank you :-)
I am pretty new to databases and DB2 in particular. I have this problem: there is an already populated db and I need to perform a certain operation on each reacord of a table. The operation consists in modifying the content of a VARCHAR() column, basically to remove some spaces in the records.
For example, suppose this is the table:
Code:
----------------------------- | FULL_NAME | AGE ..... ----------------------------- | Bobby Sans | 34 ----------------------------- | Ted Spencer | 23 ----------------------------- | John Turner | 50 -----------------------------
Of course, I know how to do it in Java, but I want to know if I can do it in a more performant way using something like stored-procedures.
Please, point to any relevant page/tutorial/example.
Thank you :-)
Comment