Subject | Re: [ib-support] SQL syntax problem |
---|---|
Author | robert-wagner@t-online.de |
Post date | 2001-09-15T20:25:10Z |
Yves Glodt,
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
> I've got a problem with a statement.[snip]
> First, this is the DB:
> This is the query:You can try:
> ----------------------
> 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
>
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