Subject | Re: [firebird-support] UNION [ALL] Error Question |
---|---|
Author | Milan Babuskov |
Post date | 2003-08-26T13:54:48Z |
february1874 wrote:
SELECT s.ClientID, s.RecordType, ...
My guess is that when you write S.* the column order is not determined,
so you can get unpredictable results (different column order in queries).
--
Milan Babuskov
http://fbexport.sourceforge.net
> Why would this query:Have you tried to name all columns in both queries, like:
> -----------------------------------------------
> SELECT S.*
> FROM SIMULATOR S
> WHERE S.ClientID=13 AND (S.recordType=0) OR (S.recordType=2) OR
> (S.recordType=100)
>
> UNION ALL
>
> SELECT S.*
> FROM SIMULATOR S
> WHERE S.ClientID=13 AND (S.recordType=0)
> --------------------------------------------
>
> produce the error
> ------------------------
> ISC ERROR MESSAGE:
> Dynamic SQL Error
> SQL error code = -104
> Invalid command
> count of column list and variable list do not match
> ---------------------
SELECT s.ClientID, s.RecordType, ...
My guess is that when you write S.* the column order is not determined,
so you can get unpredictable results (different column order in queries).
--
Milan Babuskov
http://fbexport.sourceforge.net