2009/12/15 Cariotoglou Mike <m...@singular.gr>:
> Simon, thanks for the answer. your code helped track down the issue,
> which I *still* believe to be a bug:
>
.
.
.
>
> select * from
> (select *,"
> cast((select count(*) from ITEM_ARTIST where
> ARTIST_id=artists.artist_id) as int) CNT
> from ARTISTS
> )
>
> now, any WHERE clause works as expected.
>
> Ideas ?
>

No -

essence of problem:

why is there a difference in output between the following selects?

SQLite version 3.6.20
Enter ".help" for instructions
sqlite> create table t1( id integer );
sqlite> create table t2( id integer );
sqlite>
sqlite> insert into t1 values( 1 );
sqlite> insert into t1 values( 2 );
sqlite> insert into t2 values( 1 );
sqlite> insert into t2 values( 2 );
sqlite> insert into t2 values( 2 );
sqlite>
sqlite> select * from t1 where (select count(*) from t2 where
t2.id=t1.id) = '2';
sqlite> select * from t1 where cast((select count(*) from t2 where t2.id=t1.id)
 as integer)= '2';
2

Regards,
Simon
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to