Question: Let's assume that I have a table which an exemplary row looking like this:

```
ID    PAYMENT_BASE    PAYMENT_A    PAYMENT_B    PAYMENT_C    PARTNER_ID    TRANSFER_TITLE
1     123.0           15.12        30           15.91        123456        null

```

Now I would like to generate a string based on the data in this table, and UPDATE the `TRANSFER_TITLE` column.

What I expect to have in the `TRANSFER_TITLE` looks like this:

```
123,00-PA 15,12-PB 30,00-PC 15,91/123456

```

Things that is very important: a number in format 10 should be 10,00. A number in format 12.1 should be in format 12.10, and a number in format 12.12 should stay the same but have just the dot replaced with comma - 12,12...

Is that even possible in Oracle?

Answer: 
First of all: 

How to get data in TRANSFER\_TITLE

```
update table
set TRANSFER_TITLE = ID || PAYMENT_BASE || PAYMENT_A || PAYMENT_B || PAYMENT_C || PARTNER_ID

```

To format the numbers to returning two or more decimals I would do something like: `to_number(to_char(PAYMENT_BASE), 2)`

If you need to change the comma to dot make the number fields to varchar and then do `REPLACE(TRANSFER_TITLE, '.',',')`

Hope it comes to some help.
Try this:

```
update table set TRANSFER_TITLE = replace(to_char(PAYMENT_BASE, 'fm9999999.90'),'.',',') || '-PA '
|| replace(to_char(PAYMENT_A, 'fm9999999.90'),'.',',') || '-PB ' 
|| replace(to_char(PAYMENT_B, 'fm9999999.90'),'.',',') || '-PC '
|| replace(to_char(PAYMENT_C, 'fm9999999.90'),'.',',') || '/' || PARTNER_ID

```