[ https://issues.apache.org/jira/browse/DERBY-2937?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel John Debrunner updated DERBY-2937: ----------------------------------------- Attachment: groupby.txt Partial back out of svn revision 554399 > ERROR 22011: The second or third argument of the SUBSTR function is out of > range with data concatenation in group by query. > ----------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-2937 > URL: https://issues.apache.org/jira/browse/DERBY-2937 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.4.0.0 > Reporter: Daniel John Debrunner > Assignee: Daniel John Debrunner > Attachments: groupby.txt > > > CREATE TABLE A (C CHAR(10) NOT NULL, D DATE NOT NULL, DC DECIMAL(6,2)); > INSERT INTO A VALUES ('aaa', DATE('2007-07-10'), 500.00); > SELECT A.C, SUBSTR (MAX(CAST(A.D AS CHAR(10)) || CAST(A.DC AS CHAR(8))), 11, > 8) AS BUG > FROM A GROUP BY A.C; > results in a 22011 error on the select. > ij> C |BUG > ------------------- > ERROR 22011: The second or third argument of the SUBSTR function is out of > range > Note that the ResultSetMetaData seems to indicate to ij that the column width > of "BUG' is four instead of 18. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.