Subject Valid SQL?
Author Stevio
I have a function using the following SQL in my application. It works ok on
my PC, using Firebird 1.5.1. It also worked with version 1 of Firebird.
However, I have other people using the application over a network, using
Firebird 1.5 or 1.5.1 and when they try it, the system hangs.

Does the SQL look ok to you?

Thanks,
Stephen
-------

SELECT
BBH.MONTH_BORROWED,
BBH.YEAR_BORROWED,
B.LOCATION_ID,
L.DESCRIPTION,
COUNT(*) AS REC_COUNT
FROM
BOOKBORROWERHISTORY BBH,
BOOK B LEFT OUTER JOIN LOCATION L ON B.LOCATION_ID = L.LOCATION_ID
WHERE
B.BOOK_ID = BBH.BOOK_ID AND
(BBH.DATE_BORROWED >= :StartDate) AND
(BBH.DATE_BORROWED <= :EndDate)
GROUP BY
BBH.YEAR_BORROWED,
BBH.MONTH_BORROWED,
L.DESCRIPTION,
B.LOCATION_ID
ORDER BY
BBH.YEAR_BORROWED,
BBH.MONTH_BORROWED,
L.DESCRIPTION



--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.262 / Virus Database: 264.4.0 - Release Date: 06/08/2004