Subject RecordCount and Union
Author Michael Vilhelmsen
Hi

I use D5 and IBO version 4.3.A

I discovered yesterday, that if I had an SQL statement like this:

select
nr,
Navn
from ekspedienter
where
Ekspedienter.afdeling_ID=:PAfdeling_ID and ekspedienter.nr=99999

Union

Select
nr,
navn
from EkspedienterTilSalg Where
Afdeling_ID=:PAfdeling_ID and
UAfd_Navn=:PUAfd_Navn



And later did a MyQuery.RecordCount it was turned into:

select
Count(*)
from ekspedienter
where
Ekspedienter.afdeling_ID=:PAfdeling_ID and ekspedienter.nr=99999

Union

Select
nr,
navn
from EkspedienterTilSalg Where
Afdeling_ID=:PAfdeling_ID and
UAfd_Navn=:PUAfd_Navn


Which gave me this error:

ISC ERROR CODE : 335544569
Dynamic SQL Error SQL error code = -104 Invalid command count of
column list and variable list do not match



It this fixed in a newer version ?

Michael