Sybase-IQ : Query with join returns always 0 rows (but count(*) give rows)

501 views Asked by At

I have a very strange comportment on my Sybase IQ database.

I have 2 tables :

Table A : 47 000 000 rows

Table B : 497 rows

If I make the following query :

select count(*) from A
inner join B on A.ID = B.ID;

The result of the count is 5 661 188.

If I make the following query :

select * from A
inner join B on A.ID = B.ID;

The result is 0 row !

If I make the following query :

select A.field1 from A
inner join B on A.ID = B.ID;

The result is 5 661 188 rows.

select A.field2 from A
inner join B on A.ID = B.ID

The result is 0 row !

I execute these queries with Interactive SQL (Sybase Central).

I've tried also to execute these same queries with the ETL Talend, and i got same results as above.

Any ideas why we have these very strange results ?

Thanks

1

There are 1 answers

0
tangiobs On

Results OK when I change the option JOIN_PREFRENCE. Probably a problem with this version of Sybase IQ (15.2). See here : http://scn.sap.com/message/15605021