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.
Oracle Database

Avatar of undefined
Last Comment
WolfgangKoenig

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
johnsone

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
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
Your help has saved me hundreds of hours of internet surfing.
fblack61