[teiid-issues] [JBoss JIRA] (TEIID-3174) integer operation within LEFT command

Steven Hawkins (JIRA) issues at jboss.org
Wed Oct 15 11:13:35 EDT 2014


    [ https://issues.jboss.org/browse/TEIID-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012176#comment-13012176 ] 

Steven Hawkins commented on TEIID-3174:
---------------------------------------

Can you clarify the intent of issue?  The error message is saying that a -1 count is invalid, which means that your locate is not finding a comma.

> integer operation within LEFT command
> -------------------------------------
>
>                 Key: TEIID-3174
>                 URL: https://issues.jboss.org/browse/TEIID-3174
>             Project: Teiid
>          Issue Type: Bug
>    Affects Versions: 8.7
>            Reporter: Bram Gadeyne
>            Assignee: Steven Hawkins
>              Labels: left, stringfunction
>
> When executing a command of the following form
> LEFT(Description,((LOCATE(',',Description))-1))
> I get an Exception like this:
> 14:31:00,038 WARN  [org.teiid.PROCESSOR] (Worker3295_QueryProcessorQueue53347) 5tz38FpQ/WJw TEIID30020 Processing exception for request 5tz38FpQ/WJw.50 'TEIID30328 Unable to evaluate LEFT(sometable.Description, (LOCATE(',', sometable.Description) - 1)): TEIID30384 Error while evaluating function left'. Originally ExpressionEvaluationException 'TEIID30396 Left/Right count -1 is invalid.  It must be >= 0.' FunctionMethods.java:758. Enable more detailed logging to see the entire stacktrace.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the teiid-issues mailing list