Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Truncation error on trailing spaces
Sun, May 27 2007 5:58 PMPermanent Link

"Ole Willy Tuv"
create table test (col1 char varying(3));
insert into test values ('abc ');

ElevateDB Error #1011 An error occurred with the column col1 (The value was
truncated)

The general assignment rule is that if the length of the source value is
greater than the maximum length of the target, and the extra characters are
all spaces, then the source value is truncated to the length of the target.

Ref. 9.2 Store assignment.

Ole Willy Tuv

Tue, May 29 2007 3:11 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ole,

<< The general assignment rule is that if the length of the source value is
greater than the maximum length of the target, and the extra characters are
all spaces, then the source value is truncated to the length of the target.
>>

I'll adjust that error message accordingly.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, May 29 2007 3:57 PMPermanent Link

"Ole Willy Tuv"
Tim,

<< I'll adjust that error message accordingly. >>

What I meant was that the assignment in my example shouldn't throw an error,
since the extra character is a space. The value 'abc ' should be silently
truncated to 'abc'.

Ole Willy Tuv

Tue, May 29 2007 4:09 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ole,

<< What I meant was that the assignment in my example shouldn't throw an
error, since the extra character is a space. The value 'abc ' should be
silently truncated to 'abc'. >>

I understand, although my response was a little vague.  What I meant was
that I will adjust when the error is triggered based upon the proper length.
Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image