Link to home
Start Free TrialLog in
Avatar of rrisal
rrisal

asked on

Adding prefix to a column

We're trying to add prefix (character) before the value in the column. We have about 28000 record which we need to add (BDM) before the values in the column which are numbers. For example if the column is 2030 the final result should be "BDM-2030". The table is in oracle 10g and we're trying to use pl/sql for this process. Thanks for help.
ASKER CERTIFIED SOLUTION
Avatar of johnsone
johnsone
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of WolfgangKoenig
WolfgangKoenig

You can use also Views to hold the content of the original tables:
CREATE TABLE YOURTABLE AS SELECT '2030' AS COL1 FROM DUAL

CREATE VIEW BDM_YOURTABLE AS
SELECT 'BDM-'||YOURTABLE.COL1 AS COL1
FROM YOURTABLE