Toad World® Forums

Auto truncation of trailing space?

In TOAD SQL editor when I select a 3-char field that has its 3rd character = space, only 1st 2 characters are displayed in the results grid.

However if length(column) is selected it gives right result = 3.

I have 2 PCs. This happens on TOAD in one but not on the other. Working version is 12.1.0.22 and non-working version is 10.6.1.3

Is there some setting that needs to be tweaked?

toad options - search trim - there is an option to trim trial blanks - bet one has it set and one does not. Always do a search in options for all such questions - easy, fast and usually finds the answer real quick

I found the trim option.

It is unchecked in both TOAD versions.

But it works in v. 12.1.0.22 but not in v.10.6.1.3 ; the database datatype of the column being selected is CHAR(3) - not Varchar2(3).

So the issue remains … char vs. varchar2 should’nt make any difference - right?

It’s supposed to apply to CHAR and NCHAR only since those datatypes automatically pad out to their length. VARCHAR2 doesn’t do that, so we assume that if you have trailing spaces in a VARCHAR2 column, you want them to be there. It sounds like it was a bug in Toad 10.6