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!

Adding string to number in Case Statement

Chandu VenuOct 11 2021

Hello,
Create Table T1_Temp(N1 number,N2 number);
insert into T1_TEMP values (162894684325,null);
insert into T1_TEMP values (-5635465675,null);
insert into T1_TEMP values (152623721,null);
insert into T1_TEMP values (-52645612,null);
insert into T1_TEMP values (10012.54,null);
insert into T1_TEMP values (-52645612,null);
insert into T1_TEMP values (8962,null);
insert into T1_TEMP values (-7854.2,null);
Oracle DB Version: Oracle 19c (Enterprise Edition Release 19.0.0.0.0)
I have a sample number format like:
image.png
I would like to write a case statement to convert these numbers into:
image.pngEssentially, the clause for the conversion is:
image.png
I am getting invalid character error when I try to concatenate a '$' and a 'B' for the number in a case statement. Any help is greatly appreciated.

Thanks

This post has been answered by Frank Kulash on Oct 11 2021
Jump to Answer
Comments
Post Details
Added on Oct 11 2021
10 comments
2,590 views