Subject Nested SELECT Trouble
Author Tobias Giesen
Hello!

I've got a nested select query which used to work. It does work when I try
it via interactive SQL, but IBO won't prepare it: 'FieldName: not found.'

Ideas?

Here's the SQL:
------------------------------------------------
SELECT TD.TYP,TD.DATUM,
(SELECT
COUNT(BT.BETRAG)
FROM BETRAEGE BT
WHERE BT.TYP=TD.TYP AND BT.DATUM=TD.DATUM),
(SELECT
SUM(BT.BETRAG)
FROM BETRAEGE BT
WHERE BT.TYP=TD.TYP AND BT.DATUM=TD.DATUM),
TD.Erledigt, TD.KOMMENTAR
FROM BetragsEvents TD
ORDER BY TD.TYP,TD.DATUM DESC
------------------------------------------------

Thanks!
Tobias