db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bogdan Calmac <bcal...@gmail.com>
Subject Concatenating two numbers as a string
Date Sat, 03 May 2008 16:59:50 GMT

To concatenate two numbers in a string you have to do something like this (in
derby 10.3):

trim(char(min_value)) || trim(char(max_value))

This is pretty ugly, considering that it could have been as simple as:

min_value || max_value

Also, the documentation for the concatenate operator states that "Because
all built-in data types are implicitly converted to strings, this function
can act on all built-in data types". Is the documentation wrong?

While trying different things, I noticed that numeric types cannot be cast
to VARCHAR (which is also specified in the documentation). Is there some
technical limitation to prevent such a natural conversion?
-- 
View this message in context: http://www.nabble.com/Concatenating-two-numbers-as-a-string-tp17036203p17036203.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message