geek2000 geek2000 - 10 months ago 60
SQL Question

Add a string to a specific location in Postgres

I need to add a dot in the 4th position of each string in a column. How can I perform this in Postgres?


should become

Answer Source

For example use left / right:

db=> select left('1234', 3) || '.' || right('1234', -3);