[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libreoffice-users] SQL Syntax UPDATE

Hi Harvey,
> The SQL editor is rejecting this UPDATE query that, I believe, obeys
> the standard SQL syntax.
> UPDATE 'Adressensammlung'.'Adressen' SET 'Adressen'.'Print_flag' = TRUE
> WHERE 'Adressen'.`Xmas` = TRUE;
> I'm no SQL expert but I cannot for the life of me understand what is
> wrong with that command.

You have to mask tablenames and fieldnames with ", if you are using the
internal databases.

UPDATE "Adressensammlung"."Adressen" SET "Adressen"."Print_flag" = TRUE
WHERE "Adressen"."Xmas" = TRUE;

Could be you are using MySQL/MariaDB (I see there is a database-name in
the code). So you could also mask databasename, tablename and fieldname
with `.

UPDATE `Adressensammlung`.`Adressen` SET `Adressen`.`Print_flag` = TRUE
WHERE `Adressen`.`Xmas` = TRUE;

Everything, which is masked with ', will be detected as text, not as a
name of the database, table or field.


Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3

To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Re: [libreoffice-users] SQL Syntax UPDATEHarvey Nimmo <harvey@nimmo.de>
[libreoffice-users] SQL Syntax UPDATEHarvey Nimmo <harvey@nimmo.de>
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.