Invalid database key on view with agregate functions


2006-12-13 04:46:05 AM
delphi154
When I create a view like this:
CREATE VIEW V_TEST
(
aYEAR,
aMONTH
)
AS
SELECT
aYEAR,
MAX(aMONTH)
FROM TABLE_DATES
GROUP BY aYEAR;
I can SELECT * FROM V_TEST and I get the results as espected, but when I
explore with IBConsole V_TEST properties and select DATA an error raises
"Invalid Database Key" and no data is fetched.
This error happens with other tools like Crystal Reports 10 I can not see the
columns of the view and then can not link it to other tables.
the problem seems to be the MAX and GROUP BY in a view!!
Could anyone help me please?