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?

Vince
20.5k16 gold badges49 silver badges65 bronze badges
asked May 17, 2022 at 15:33

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)

answered May 18, 2022 at 6:06

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.