Bugs item #2987398, was opened at 2010-04-14 23:43
Message generated for change (Comment added) made by skinkie
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2987398&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: SQL CVS Head
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stefan de Konink (skinkie)
Assigned to: Niels Nes (nielsnes)
Summary: SQL: concatination length is based on last column

Initial Comment:
When concatinating constant strings, the maximum column length is based on the 
last column type. It can be reproduced with:

create table test2(a varchar(256), b int, c varchar(16));
insert into test2 values 
('testaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
 1, 'test');
select a||' '||b||' '||c from test2;
SQLException:str_cast:value too long for type (var)char(16)


----------------------------------------------------------------------

>Comment By: Stefan de Konink (skinkie)
Date: 2010-04-15 13:59

Message:
Workaround revealed something as well. null results for the ones that would
'overflow'.

----------------------------------------------------------------------

Comment By: Stefan de Konink (skinkie)
Date: 2010-04-14 23:48

Message:
As work around:
select cast(a||' '||b as varchar(256))||' '||c from test2;

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2987398&group_id=56967

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to