'Oracle SQL to append character based on count
I have a requirement to write a Oracle SQL Select query to dynamically append a certain character based on the value in a column.
For Eg -
COLUMN1
1
2
3
Then result should be,
COLUMN1 DERIVED_COLUMN
1 @
2 @@
3 @@@
Right now, I tried with case and decode but they are not dynamic.
SELECT COLUMN1, DECODE(COLUMN1, 1, '@', 2, @@, .....) FROM MY_TABLE
What else can I try?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
