Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Concatenate Multiple Values into Single Table Column

733880Jun 5 2012 — edited Jun 12 2012
Hello Experts,


I am using database 11g.

I have the following table DEPT

Column:: DEPT_ERR varchar2

Case: I am performing a set of validation on record, if the record contains multiple errors then needs to concatenate all the errors in the single column.
IF condition1= 'Wrong value' THEN
END IF;
PROCEDURE.....
L_Text = ‘Dept Invalid’
BEGIN
update DEPT
 set DEPT_ERR = DEPT_ERR ||nvl(DEPT_ERR , L_Text);
WHERE …;
END;
Output

DEPT_ERR
Wrong value Dept Invalid
Is the above code right or did i missed somthing?

Can somebody help me. Is there any other way of doing this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 10 2012
Added on Jun 5 2012
7 comments
227 views