I have a table with three columns. Column1 is id. Column2 is filename. Column3 is location. I need to write a query that will take all files with filename = X and will replace part of the string for 'location' lets say location = '/home/AAA/bin' and it will replace it with '/home/BBB/bin'. The start of location is always the same but the end is not always the same. I mean it will always start with /home/AAA/ but the end of the location is different for every file - /bin/ could be /somethingelse/.
Tell me more
×
Stack Overflow is a question and answer site for
professional and enthusiast programmers. It's 100% free, no registration required.
|
You need to use this Postgres function
Your situation involves the select statement having the following:
You can get more information from here. |
||||
|