Subject Re: [ib-support] Select statement
Author Walter Neumann
Am Sonntag, 9. Februar 2003 23:35 schrieb Aage Johansen:
> Show us the statement where you do the count.

I use Kylix 2 and dbExpress. Opening the SQLDataSet with the postet select
statement is ok. There is for the DataSet a property RecordCount. If I read
this property comes the error message. So I thought it is a problem of the
dbExpress driver and tried it with a SP:
ANZAHL = (SELECT COUNT (*) FROM MITARBVIEW MA
WHERE 'TODAY' >= (SELECT MAX(EA.EINTRITTSDATUM) FROM MITARBEINAUSVIEW EA
WHERE ((EA.MITARBID = MA.PERSONENIDINT) AND ((EA.AUSTRITTSDATUM IS
NULL) OR (EA.AUSTRITTSDATUM >= 'TODAY')))));
SUSPEND;
Now I recieve error -206 "subselect is illegal in this context". How can I
count, if subselect is illegal? The task is:
Table 1 contains the employees and table 2 the starting and ending dates for
all employees. But for 1 employee can exist many starting and ending dates.
How can I know, how many employees are working now?

Thank you for your suggestions. Walter.