I want to insert large number of rows with one of fields going into a column defined with CHAR 30. I need the string inserted into the column to be right justified. How can it be done in an insert query ?
Why do you care how the data is stored in database? You need something on SELECT query to see it right justified only for YOU because then if someone don't want that way (now or in future) apart from you who uses that table then they will have to add additional function all the time when they references this field.
select lpad(strip('aaaaaaaaaaaaaaaaaaaa '),30,' ') from sysibm.sysdummy1