Home > Archive > SQL Anywhere database > May 2005 > Little confusion !! order by generates different number of rows ??









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Little confusion !! order by generates different number of rows ??
Peter Stojkovic

2005-05-23, 3:23 am

ASA 9.02
using ISQL 9.02 build 2451


This select-Statement gives back 0 rows

SELECT * FROM DBA.plc_address WHERE press_nr = 7 AND picos_type = 2 and
default_plc_type = 8 order by comment_str;


The same WHERE-Criteria without ORDER BY generates 10 rows!

SELECT * FROM DBA.plc_address WHERE press_nr = 7 AND picos_type = 2 and
default_plc_type = 8 ;



Does I not have understand SQL ???

both selects should always have the same result only the sequence should be
different !!

What can be the reason for this behavior ??


Thanks for any help


Paul Horan[TeamSybase]

2005-05-23, 7:24 am

"Peter Stojkovic" <Peter.Stojkovic@gmx.net> wrote in message news:4291906e@forums
-1-dub...
> ASA 9.02
> using ISQL 9.02 build 2451
>
>
> This select-Statement gives back 0 rows
>
> SELECT * FROM DBA.plc_address WHERE press_nr = 7 AND picos_type = 2 and default_plc_type = 8 order by comment_str;
>
>
> The same WHERE-Criteria without ORDER BY generates 10 rows!
>
> SELECT * FROM DBA.plc_address WHERE press_nr = 7 AND picos_type = 2 and default_plc_type = 8 ;
>
>
>
> Does I not have understand SQL ???
>
> both selects should always have the same result only the sequence should be different !!
>
> What can be the reason for this behavior ??
>
>
> Thanks for any help



Do a "validate" on the plc_address table. I've seen this happen when an index gets corrupted.

--
Paul Horan[TeamSybase]


Peter Stojkovic

2005-05-23, 7:24 am

The validate does not help.
I have now installed Build 3124 and everything was allright.

I think, that is really a very critical Bug, if this happens other customers
also.


Thanks
Peter






"Paul Horan[TeamSybase]" < paulhATvcisolutionsD
OTcom> wrote in message
news:4291bdd7$1@foru
ms-1-dub...
> "Peter Stojkovic" <Peter.Stojkovic@gmx.net> wrote in message
> news:4291906e@forums
-1-dub...
>
>
> Do a "validate" on the plc_address table. I've seen this happen when an
> index gets corrupted.
>
> --
> Paul Horan[TeamSybase]
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com