Thank you, Robert! As always on target.
This is better than filling the Location fields with some unneeded
value. Great stuff. Man lernt nie aus!
On Tue, 2022-08-16 at 10:15 +0200, Robert Großkopf wrote:
SELECT `Location`, COUNT( `Location` ) FROM
`Items` GROUP BY `Location`
The result is correct for all LOCATIONS that are not empty, but
surpisingly the blank field for the empty locations is accompanied
the value 0. How can I get the right count for the empty fields as
SELECT COALESCE(`Location`,'Empty') AS `Loc`, COUNT( `ID` ) FROM
`Item_Management`.`Items` GROUP BY `Loc`
COUNT: Always use a field which should never be NULL (primary key for
Set a vallue for a field, which is empta at this moment. If
contains characters it will work with 'Empty' as shown above.
Didn't test it!
To unsubscribe e-mail to: firstname.lastname@example.org
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Impressum (Legal Info)
: 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