I'm trying to update a particular text string in a long trxt eg
505400005004GBP23800280000
trying to replace the 10th char 0 with a 1 how can I do this please, thanks
Software/Hardware used:
db2 sql
ASKED:
June 25, 2012 5:06 PM
UPDATED:
June 26, 2012 8:26 PM
Before you do it as an update do it as a select so you can see how it working
and assuming you only want to update that one value.
Select substring(myString,1,9) || ’1′ || substring(myString,11,50) from myfile
where myString = ’505400005004GBP23800280000′
once that works
Update myfile
set myString =substring(myString,1,9) || ’1′ || substring(myString,11,50);
where myString = ’505400005004GBP23800280000′
Phil
Thanks Guys, will give that a go
thanks Guys – that was perfect
Thanks for the feedback
“Silence is the most perfect expression of scorn. ”
George Bernard Shaw