You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2013/06/25 06:42:21 UTC

[jira] [Updated] (DERBY-6020) Issue a clearer syntax error message for use of LIKE with a numeric column

     [ https://issues.apache.org/jira/browse/DERBY-6020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mamta A. Satoor updated DERBY-6020:
-----------------------------------

    Urgency: Normal
     Labels: derby_triage10_11  (was: )
    
> Issue a clearer syntax error message for use of LIKE with a numeric column
> --------------------------------------------------------------------------
>
>                 Key: DERBY-6020
>                 URL: https://issues.apache.org/jira/browse/DERBY-6020
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.9.1.0
>            Reporter: Bryan Pendleton
>              Labels: derby_triage10_11
>
> I tried to use 'LIKE' with a numeric column, and the message was quite confusing:
> ij version 10.9
> ij> connect 'jdbc:derby:brydb;create=true';
> WARNING 01J01: Database 'brydb' not created, connection made to existing database instead.
> ij> drop table bry;
> 0 rows inserted/updated/deleted
> ij> CREATE TABLE bry( col1 varchar(10), JOBNUMBER INTEGER default 0);
> 0 rows inserted/updated/deleted
> ij> select * from bry where col1 like '%' or JobNumber like '%';
> ERROR 42884: No authorized routine named 'LIKE' of type 'FUNCTION' having compatible arguments was found.
> ij> quit;
> It would have been much easier to diagnose my problem if the message had said something like:
> ERROR xxxxx: Operator 'LIKE' must be used with a character expression, but argument 'JobNumber' is of type 'INTEGER'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira