Hello,
I get a strange error if I try to execute the following union query from
SQLStudio or from MS-Access:
SELECT Count(Teilenummer), 'Anzahl abgegebene Angebote', NULL
FROM tbl_Teile
WHERE tbl_Teile.lfdNr_Teile = Any (SELECT Max(tbl_Teile.lfdNr_Teile)
FROM tbl_Teile
GROUP BY tbl_Teile.lfd_Anfragenummer, tbl_Teile.Teilenummer)
AND
Verknuepfung_Angebot is not null
UNION ALL
SELECT Zaehl.Anzahl, 'Anzahl erhaltene Auftr�ge', Zaehl.Anzahl /
Angebote.Gesamt
FROM
(
SELECT COUNT(Teilenummer) AS Anzahl FROM tbl_Teile
WHERE Status_ID = 7
AND tbl_Teile.lfdNr_Teile = Any (SELECT Max(tbl_Teile.lfdNr_Teile)
FROM tbl_Teile
GROUP BY tbl_Teile.lfd_Anfragenummer,
tbl_Teile.Teilenummer)
) Zaehl,
(
SELECT COUNT(TEILENUMMER) AS Gesamt FROM tbl_Teile
WHERE tbl_Teile.lfdNr_Teile = Any (SELECT
Max(tbl_Teile.lfdNr_Teile)
FROM tbl_Teile
GROUP BY tbl_Teile.lfd_Anfragenummer,
tbl_Teile.Teilenummer)
AND Verknuepfung_Angebot is not null
) Angebote
SQL Dialog says: Statement successfully executed, but the result table is
empty and in the status window I get:
Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
Syntax error or access violation;-2000 POS(1) Row too long.
SELECT Count(Teilenummer), 'Anzahl abgegebene Angebote', NULL <snip>
As I was looking for error -2000 I found that this error should only appear,
if I make a create or alter table, so I found this really strange.
If I execute each select alone, I get the results I want. But I need a
resulttable where in the first line is the result of my first SQL-Query, in
the second line the result of my second SQL-Query and so on.
Maybe there's another way to achive this, then please tell me how.
Thanks in advance.
Peter H�bschen
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]