You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Select statement doesn't include leading blanks in character field, for example if the field has value ' X' then the select and generated insert statement becomes 'X'-
To Reproduce
Insert leading blanks into a character field, then do select from DB2 for i Extension.
Expected behavior
Would expect the return statement to include leading blanks and be ' X'
Screenshots
VSC:
select
insert
STRSQL:
Environment
OS: Windows 10
Extension Version 1.7.0
Other
Thought it might be a setting for the job but couldn't find it so apologies if I'm just blind
The text was updated successfully, but these errors were encountered:
I think there are two reasons why we don't see those whitespaces:
1/ It looks like Mapepire does trim white spaces, I suspect it is the
.trim()
on the
cellDataForResponse = cellData.toString().trim();
line in BlockRetrievableRequest.java.
Trimming trailing whitespaces might make sense for fixed length fields since they convey no information. I think they should be kept for varying length fields (even if SQL ignores them for comparisons, they are technically different values).
Leading whitespaces should never be trimmed.
2/ Even if the whitespaces were not trimmed by Mapepire, the result is displayed in a div in a td where the default html behavior will be to trim leading whitespaces (and collapse multiple whitespaces for that matter). This can be solved here with css (white-space: pre;).
Describe the bug
Select statement doesn't include leading blanks in character field, for example if the field has value ' X' then the select and generated insert statement becomes 'X'-
To Reproduce
Insert leading blanks into a character field, then do select from DB2 for i Extension.
Expected behavior
Would expect the return statement to include leading blanks and be ' X'
Screenshots
VSC:


select
insert
STRSQL:

Environment
Other
Thought it might be a setting for the job but couldn't find it so apologies if I'm just blind
The text was updated successfully, but these errors were encountered: