Re: Puzzle: What should this query return?

From: bobalama <bobalama_at_yahoo.com>
Date: 28 Jun 2002 21:56:07 -0700
Message-ID: <be270968.0206282056.21b8108f_at_posting.google.com>


It should return 1 row that says: (o rows)...

Cheers,

-Bobalama

Steve Kass <skass_at_drew.edu> wrote in message news:<3D1CC3BC.203279AC_at_drew.edu>...
> What should this query return, assuming T contains one row?
>
> select case when 1=1 then 12 else count(0) end as X from T where 1=0
>
> SQL Server says:
>
> X
> --
> 12
>
> Ocelot says:
> [OCELOT][OCELOT]CLI specific: Overflow while allocating RC, table size = <768> stmt count = <51>
>
> Similar query:
>
> select case when 1=0 then 12 else 1+count(0) end as X from T where 1=0
>
> SQL Server says:
>
> X
> --
> 1
>
> Ocelot says:
>
> X
Received on Sat Jun 29 2002 - 06:56:07 CEST

Original text of this message