Subject | Re: [firebird-support] What's wrong with this SQL? |
---|---|
Author | Mercea Paul |
Post date | 2011-09-20T06:31:21Z |
On 2011.09.20 8:53 AM, Kjell Rilbe wrote:
select
case when "RemovedAt" is null then 'Cur' else 'Hist' end "Category",
count(*) "Count"
from "Objects"
where "ObjectKind" = 92
group by 1
order by 1
Regards,
Paul
[Non-text portions of this message have been removed]
>Could you try:
> Consider this SQL:
>
> select
> case when "RemovedAt" is null then 'Cur' else 'Hist' end "Category",
> count(*) "Count"
> from "Objects"
> where "ObjectKind" = 92
> group by case when "RemovedAt" is null then 'Cur' else 'Hist' end
> order by case when "RemovedAt" is null then 'Cur' else 'Hist' end
>
> Why would that SQL give me this error:
>
> SQL Message : -104
> Invalid token
> 0733-44 24 64
>
select
case when "RemovedAt" is null then 'Cur' else 'Hist' end "Category",
count(*) "Count"
from "Objects"
where "ObjectKind" = 92
group by 1
order by 1
Regards,
Paul
[Non-text portions of this message have been removed]