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 "Bernt M. Johnsen (JIRA)" <de...@db.apache.org> on 2006/10/09 13:42:21 UTC
[jira] Commented: (DERBY-1306) Support more than just varchar with
vertical bars on query
[ http://issues.apache.org/jira/browse/DERBY-1306?page=comments#action_12440868 ]
Bernt M. Johnsen commented on DERBY-1306:
-----------------------------------------
The concatenation operator is in SQL 2003 defined
In Ch 6.28 < string value expression>
as
<concatenation> ::= <character value expression> <concatenation operator> <character factor>
or
<blob concatenation> ::= <blob value expression> <concatenation operator> <blob factor>
and in Ch. 6.35 <value array expression>
as
<array concatenation> ::= <array value expression 1> <concatenation operator> <array primary>
Thus Derby behaves correctly wrt. the SQL specification.
> Support more than just varchar with vertical bars on query
> ----------------------------------------------------------
>
> Key: DERBY-1306
> URL: http://issues.apache.org/jira/browse/DERBY-1306
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 10.1.2.1
> Environment: Relevant for this? Windows XP
> Reporter: Bill Robertson
>
> I'm not sure if this is ij or derby proper, but the concat operator || should work for just about any data type. Derby is zero maintenance, but data rarely is, and a good sql interface is important. Often it's very convenient to write a query that generates other sql statements and that's difficult w/o concatination.
> e.g. create a table with a timestamp column, assume that the column name is originated.
> Try the following query:
> ij> select month(originated) || '-' || year(originated) from review;
> get the following error:
> ERROR 42846: Cannot convert types 'INTEGER' to 'VARCHAR'.
> The conversion to a string should pretty much work all the time unless the operand is some sort of blob type.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira