By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
4 rows affected
DESCRIPTION | PARAMVALUE1 | PARAMVALUE2 | PARAMVALUE3 |
---|---|---|---|
This sentence has no parameteres, and it should be shown like this | null | null | null |
This sentence has only one parametere, and it should be shown right here {param} with rest of text | 100 | null | null |
This sentence has two parameteres, one here {param} and one here {param}, show full sentence | 100 | 200 | null |
This sentence has all parameteres, here {param} and here {param} and there {param} | 100 | 200 | 300 |
REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(DESCRIPTION,'{PARAM}',PARAMVALUE1,1,1),'{PARAM}',PARAMVALUE2,1,1),'{PARAM}',PARAMVALUE3,1,1) |
---|
This sentence has no parameteres, and it should be shown like this |
This sentence has only one parametere, and it should be shown right here 100 with rest of text |
This sentence has two parameteres, one here 100 and one here 200, show full sentence |
This sentence has all parameteres, here 100 and here 200 and there 300 |