Subject Re: [ib-support] SQL syntax problem
Author robert-wagner@t-online.de
Yves Glodt,

> I've got a problem with a statement.

> First, this is the DB:

[snip]

> This is the query:
> ----------------------
> SELECT ADDRESS.CATEGORY,COUNT(ADDRESS.KEYINDEX),CATEGORIES.NAME FROM
> ADDRESS,CATEGORIES WHERE ADDRESS.CATEGORY=CATEGORIES.C_NUMBER GROUP BY
> CATEGORY;
>
> This is the resulting error:
> -------------------------------
> Statement failed, SQLCODE = -104
> Dynamic SQL Error
> -SQL error code = -104
> -invalid column reference
>

You can try:

SELECT ADDRESS.CATEGORY, CATEGORIES.NAME, COUNT(ADDRESS.KEYINDEX)
FROM ADDRESS,CATEGORIES
WHERE ADDRESS.CATEGORY=CATEGORIES.C_NUMBER
GROUP BY ADDRESS. CATEGORY, CATEGORIES.NAME



HTH

Robert