Den 2011-09-20 10:48 skrev Svein Erling Tysvær såhär:
> > I was under the impression that the query parser would recognize that
> > the two expressions are identical. That's actually how it works in SQL
> > Server 2008. In fact, there you HAVE to use that syntax; you CANNOT
> > refer to the sel
Morning all,
On 20/09/11 09:25, Kjell Rilbe wrote:
> ...
> I was under the impression that the query parser would recognize that
> the two expressions are identical. That's actually how it works in SQL
> Server 2008. In fact, there you HAVE to use that syntax; you CANNOT
> refer to the select l
> I was under the impression that the query parser would recognize that
> the two expressions are identical. That's actually how it works in SQL
> Server 2008. In fact, there you HAVE to use that syntax; you CANNOT
> refer to the select list's column alias in the group by clause. I wasn't
> awa
Den 2011-09-20 08:43 skrev Helen Borrie såhär:
> At 05:53 PM 20/09/2011, Kjell Rilbe wrote:
> >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 "R
At 05:53 PM 20/09/2011, Kjell Rilbe wrote:
>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 "Rem
On 2011.09.20 8:53 AM, Kjell Rilbe wrote:
>
> 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
> 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
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 woul