Issue Details (XML | Word | Printable)

Key: CORE-4242
Type: Improvement Improvement
Status: Open Open
Priority: Trivial Trivial
Assignee: Unassigned
Reporter: Maxim Kuzmin
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Show number of column when their number is not match in FOR SELECT

Created: 08/Oct/13 10:55 AM   Updated: 08/Oct/13 11:51 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Sean Leyne added a comment - 08/Oct/13 05:25 PM
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).

Maxim Kuzmin added a comment - 08/Oct/13 11:51 PM
Yes, something like this.