Skip to content
Advertisement

Postgresql:Update text column with value from another column

I’m new to postgresql and need help with an update script where I can insert the corresponding ID between path2 and the filename if there is none.This will be done on multiple records.

After update only IDs 111 and 333 will be affected and the expected is /path1/path2/111/file1.png /path1/path2/333/file3.png

I am using this select to get the records that need updating.

Advertisement

Answer

Please try this:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement