Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show number of column when their number is not match in FOR SELECT [CORE4242] #4566

Open
firebird-automations opened this issue Oct 8, 2013 · 2 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Maxim Kuzmin (cybermax)

Example:
EXECUTE BLOCK
AS
DECLARE VARIABLE FNAME CHAR(31);
BEGIN
FOR SELECT
F.RDB$FIELD_NAME,
F.RDB$QUERY_NAME
FROM
RDB$FIELDS F
INTO
:FNAME
DO
BEGIN
END
END

Firebird return exception:
count of column list and variable list do not match.
Dynamic SQL Error.
SQL error code = -313.
count of column list and variable list do not match.

But if the number of columns is large, then it is difficult to learn, where the error. The exact number will make it possible to quickly find where the error - in SELECT or in INTO.

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Do you mean that the message should be changed to read more like:

Mismatch in count of columns in select list (x) and variable list (y).

@firebird-automations
Copy link
Collaborator Author

Commented by: Maxim Kuzmin (cybermax)

Yes, something like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant