teradata - SQL Adding the same char into multiple fields -


i have sql query brings 17 numbers format

06037-11

i need add 0 before dash, is:

060370-11

is there easy way this? have seen stuff() option, don't understand it.

edit using teradata

previous response includes example teradata 14.x using regular expression support. following work in teradata 13.x or teradata 12.x without regular expression support:

select substring('06037-11' 1 (position('-' in '06037-11') -1))     || '0-'     || substring('06037-11' (position('-' in '06037-11') + 1)) 

Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -