Thank you works like a charm but
Souhei Mhiri, February 19, 2025 - 8:33 am UTC
Thank you for your help. It works in select statement but not in update statement. Invalid number error occurs. I've tried many solutions without success.
February 19, 2025 - 2:48 pm UTC
What exactly have you tried?
I’ve tried this
Souheil Mhiri, February 20, 2025 - 5:03 am UTC
update my table
set s = rtrim ( replace ( s, 'mm' ) ) || ' ' ||
round ( 337.5 /
substr ( s,
instr ( s, 'R1: ') + 4,
instr ( s, 'R2: ') - instr ( s, 'R1: ') - 4
), 2
) || ' mm ' ||
round ( 337.5 /
substr ( s,
instr ( s, 'R2: ') + 4,
instr ( s, 'R3: ') - instr ( s, 'R2: ') - 4
), 2
) || ' mm '
where s like ‘%R1:%’;
February 20, 2025 - 3:40 pm UTC
And what is the problem? What error did you get?
invalid number
Souheil Mhiri, February 21, 2025 - 2:55 pm UTC
The error was invalid number. With select it’s Ok, but when change it with update the error invalid number occurs.
February 21, 2025 - 3:09 pm UTC
Please provide a complete test case:
- create table
- insert into
- the statement that errors