On 10/10/16 02:56 PM, Gary Dale wrote:
I have a database with a large enough number of records that I don't
want to do this manually. I would like to have query do it instead.
Everything I've found through searches seems to want to do it manually
by creating a form.
I have a small number of images (5), one of which will be added to the
database based on the content of another field.
What I was thinking was something along the lines of (extra fields
omitted)
SELECT "place"
CASE WHEN "place" = 0 THEN 'image0.png'
WHEN "place" = 1 THEN 'image1.png'
WHEN "place" = 2 THEN 'image2.png'
WHEN "place" = 3 THEN 'image3.png'
WHEN "place" >= 4 THEN 'image4.png'
END "ribbon"
FROM "Results"
However I have two issues with that. The first is that the "Ribbon"
field probably won't contain the image from the current directory but
will instead just contain the text. The other is that Base complains
about a SQL syntax error when I try to save it.
Can anyone help me move forward on this?
OK, missing comma after the first field explains the syntax error. But
as expected, I'm getting the file name rather than the actual file in
the query result.
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.