Subject | Strange behaviour with ORDER BY |
---|---|
Author | tdtappe |
Post date | 2005-12-22T08:33:50Z |
It's not a problem for me but I just came across this strange
behaviour of Firebird 1.5.2
Firebird notices wrong column-positions like this
SELECT col1, col2, col3 FROM ... ORDER BY 0
or
SELECT col1, col2, col3 FROM ... ORDER BY 4
But it also accepts commands like this
SELECT col1, col2, col3 FROM ... ORDER BY -1
SELECT col1, col2, col3 FROM ... ORDER BY 1+1
SELECT col1, col2, col3 FROM ... ORDER BY 3-1
...
but doesn't give the "expected" results or errors.
Server Version: LI-V1.5.2.4731 Firebird 1.5
Server Implementation: Firebird/linux Intel
--Heiko
behaviour of Firebird 1.5.2
Firebird notices wrong column-positions like this
SELECT col1, col2, col3 FROM ... ORDER BY 0
or
SELECT col1, col2, col3 FROM ... ORDER BY 4
But it also accepts commands like this
SELECT col1, col2, col3 FROM ... ORDER BY -1
SELECT col1, col2, col3 FROM ... ORDER BY 1+1
SELECT col1, col2, col3 FROM ... ORDER BY 3-1
...
but doesn't give the "expected" results or errors.
Server Version: LI-V1.5.2.4731 Firebird 1.5
Server Implementation: Firebird/linux Intel
--Heiko