Inserting pictures into table

Creating tables and queries
Post Reply
cartoonjazz
Posts: 54
Joined: Sun Sep 04, 2016 9:40 pm

Inserting pictures into table

Post by cartoonjazz »

Your input is very much appreciated.
I have a table with quantities and sku numbers
I have a folder with pictures named with the sku ".jpg"
I would like to automatically have the pictures loaded into a picture column in the table based on sku is this possible?
Thanks for reading
openoffice 4.1.2 windows 10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Inserting pictures into table

Post by Villeroy »

Code: Select all

SELECT "Table".*, 'pic_folder/' || "sku" || '.jpg' AS "Picture" FROM "Table"
where pic_folder is a subdirectory of the directory where the Base document lives, "Table" is a table name, "sku" is a field name.
Bind the concatenated "Picture" field to a form's picture control.
If you want show the pictures in a report, you've got to use the report builder extension.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply