Subject Re: [firebird-support] Error message from an invalid SQL Query
Author Martijn Tonies
> >select
> > Count(*)
> >from ...
>
> This says that the query should return one column of type integer (or
> similar)
>
> then you do
>
> > Union
> >
> > Select
> > nr,
> > navn
> > from ...
>
> this is two columns that have to be put into the one integer column
> above. That's impossible, hence 'count of column list and variable list
> do not match'. Mind you, I certainly wouldn't object if it was changed
> to something like 'incorrect number of columns specified' or similar,
> but I'm generally not all too unhappy with this error message.

Hmm... something along the lines of
"Incorrect number of columns in parts of UNION query" would be better,
I think.

As Michael said, all he could find (with Google) had to do with
Stored Procedures, given that there's where you use variables.


Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com