var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Cast INT to VARCHAR
I read in db2 documentation that an INT can't be cast to a VARCHAR. Just thought I would post here to confirm...
VALUES('a test' || CAST (123 AS VARCHAR(100)));
I want to concat the string to an integer, but to do that it needs to be converted to a varchar. Any sugestion?
You can cast INT or BIGINT to CHAR ..
Otherwise, this looks OK
Visit the new-look IDUG Website
, register to gain access to the excellent content.
Casting to CHAR to VARCHAR worked, the only thing that had to be altered was that CHAR padded with spaces, so i had to RTRIM the white space after it was converted to VARCHAR
VALUES('CHAR' || RTRIM(CAST(CAST(123 AS CHAR(100)) AS VARCHAR(100))) || 'END');