Subject ORDER BY problem with JDBC
Author Marcello Mannino
Hi all!
I have a problem with a query used by Jive forum.
Could you confirm that is an Interclient bug ?

Windows 2000
WI-T0.9.4.41 Firebird Test1
InterClient, version 2.1.5 for JRE 1.3 and InterBase v5 and v6


===8<==============Original message text===============

> I had a look at the sources and saw what is the other problem.
> The following query:
> private static final String POPULAR_THREADS =
> "SELECT /*+ INDEX (jiveMessage jiveMessage_mDate_idx) */
> threadID, " +
> "count(1) AS msgCount FROM jiveMessage WHERE modifiedDate > ? " +
> "AND forumID=? GROUP BY threadID ORDER BY msgCount DESC";
> is not good for Interbase. I had to change the ORDER BY clause with
> the following: ORDER BY 2 DESC
> What about moving all these queries out of the sources, like a
> SQL.xml configuration file ?
> I think it will be easier to mantain and to support different SQL
> syntaxes.

This is a bug in the Interbase JDBC driver, right? -- i.e., it doesn't
support the "AS" syntax correctly? In general, our goal is to make the SQL
queries work across all databases. This makes maintenance much, much easier
for us compared to external SQL. Is there a version of Interbase that has
this bug fixed? I remember it from 6 months ago or longer.


Jive-dev mailing list

===8<===========End of original message text===========

Best regards,
Marcello mailto:java@...