Subject | Jaybird and SELECTs with ORDER BY |
---|---|
Author | topikpl |
Post date | 2009-01-05T11:47:09Z |
Hello,
I use Firebird 2.1 + Jaybird 2.1.6 + IB Expert.
Recently I noticed my Java app returns different results then IB
Expert for exactly the same SELECT query with multiple ORDER BY clause.
Is it at all possible Jaybird is the reason? Or should I look elsewhere?
To be specific the results I get in IB Expert are sorted stable - i.e.
parts that were not affected by ORDER BY remain in place, in the order
they were added to the table.
The same SQL SELECT query in my Java app returns results which are not
stable sorted - some rows are in reverse entered-to-table order.
I can overcome the problem by expanding Java app SELECT query with
primary key ORDER BY clause, because in general the pk increases as
the rows are added, but there could be exceptions, as always...
Regards,
I use Firebird 2.1 + Jaybird 2.1.6 + IB Expert.
Recently I noticed my Java app returns different results then IB
Expert for exactly the same SELECT query with multiple ORDER BY clause.
Is it at all possible Jaybird is the reason? Or should I look elsewhere?
To be specific the results I get in IB Expert are sorted stable - i.e.
parts that were not affected by ORDER BY remain in place, in the order
they were added to the table.
The same SQL SELECT query in my Java app returns results which are not
stable sorted - some rows are in reverse entered-to-table order.
I can overcome the problem by expanding Java app SELECT query with
primary key ORDER BY clause, because in general the pk increases as
the rows are added, but there could be exceptions, as always...
Regards,