0

I've created a layer with photos using the tools in QGIS. This yields a table, where each line contains a filepath to a photo. So far so good. But the paths are all absolute. I'd like to share this project with others and would like to make the paths relative.

I tried so using the DB manager, running this query:

update 
    "Fotos Mai 2022"
set
    photo = replace(photo, 'C:\Users\Username\Documents\GIS-Project', '..');

But as a response I get the error-message:

Query execution error on CREATE TEMP VIEW _tview AS update "Fotos Mai 2022" set photo = replace(photo, 'C:\Users\Username\Documents\GIS-Project', '..'): 1 - near "update": syntax error

How can I troubleshoot this issue?

1 Answer 1

1

Ok, new day, fresh brain, solution is easy: the error message reveals that I had attempted to change the database from the wrong angle: I had been trying to change table content while being connected to a virtual layer (in QGIS' DB Manager), not to an actual database.

To connect to the actual database, in DB Manager, go to the left-hand pane "Providers" and choose a database connection (or open an new one by right-click / new connection)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.