I'm trying to alter a table to add the charachter X
to every item in a certain row in my table.
I need to trunk all transaction’s in the table under a field to 40 characters, this needs to be done using a batch executed DML statement. The 40th character should be set to a X
– to show its been shortened.
Currently I am trying to use SUBSTR
just to trial a way of updating the lines
Note: On the below example is just some trial and error attempts, I created a sample table in SQL fiddle as I'm not allowed to update on main table yet
UPDATE test SET tester = SUBSTR(tester , 40, 1) + 'x';
However this returens NULL
on all instances
I have tried
UPDATE test SET tester = tester + SUBSTR(tester , 40, 1) + 'x';
However this (when building schem in fiddler) returns
Schema Creation Failed: ORA-01722: invalid number
I have tried browsing through google and oracle data dictionary, but tbh my researching skills is pants, any ideas where I can look specifically?
I located this but I'm having trouble implementing
Any ideas would help.
Thanks