Yes that works, too. I notice that Base strips off the 'AS' keywords.
Cheers
Harvey
On Tue, 2022-08-16 at 16:02 +0200, Robert Großkopf wrote:
> Hi Harvey,
>
> tested this:
>
> SELECT COALESCE ( `User`, 'Empty' ) AS `User`, COUNT( `ID` ) FROM
> `test`.`User` AS `User` GROUP BY `User`
>
> You
Hi Harvey,
tested this:
SELECT COALESCE ( `User`, 'Empty' ) AS `User`, COUNT( `ID` ) FROM
`test`.`User` AS `User` GROUP BY `User`
You don't need to change the alias for `Location` to `Loc`.
I could save this, open this to edit in GUI, execute it - no Problem
with direct connection on MariaDB
Just one remark on this, though. The GUI and SQL Edit views seem not to
be consistent with each other. Just opening the Query to Edit GUI,
adjusting the pane size (say) and saving the result, destroys the
query.
Cheers
Harvey
On Tue, 2022-08-16 at 10:54 +0200, Harvey Nimmo wrote:
> Thank you, R
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!
Cheers
Harvey
On Tue, 2022-08-16 at 10:15 +0200, Robert Großkopf wrote:
> Hi Harvey,
> >
> > SELECT `Location`, COUNT( `Location` ) FROM
> > `Item
Hi Harvey,
SELECT `Location`, COUNT( `Location` ) FROM `Item_Management`.`Items`
`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 by
the value 0. How can I get the right count for the