1. Chris Farrer
  2. InfoMaker
  3. Tuesday, 2 February 2021 14:32 PM UTC

In the InfoMaker product, it seems I frequently, although inconsistently, get extra spaces on the end of values.  For example, I could have an expected value of “APPLE”, but instead, it displays as “APPLE          “ in the output.  I then need to use the Trim feature in Excel to remove those trailing spaces, especially when attempting to perform VLOOKUPS against additional documents.  Is there a setting somewhere that I’m missing that would prevent this from happening?   I have tried saving in multiple formats I could then Open in Excel, but the problem persists.  Thank you.

 

René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 2 February 2021 14:50 PM UTC
  2. InfoMaker
  3. # 1

Are you sure that the value is not already with spaces in the database? (e.g. Oracle stores values in CHAR columns always with the maximum number of chars and adds spaces at the end if necessary)

Comment
There are no comments made yet.
Chris Farrer Accepted Answer Pending Moderation
  1. Tuesday, 2 February 2021 16:32 PM UTC
  2. InfoMaker
  3. # 2

Will investigate.  Thank you for the suggestion.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 2 February 2021 16:40 PM UTC
  2. InfoMaker
  3. # 3

Depending on which database you are using and how you connect to it, you might be able to use the dbparm "TrimSpaces":

 

SQLCA.DBParm="TrimSpaces=1"

Comment
There are no comments made yet.
Chris Farrer Accepted Answer Pending Moderation
  1. Tuesday, 2 February 2021 16:58 PM UTC
  2. InfoMaker
  3. # 4

These posts helped me get to the answer, thanks!   Turns out there is a check box for "Trim Trailing Spaces in CHAR Data"  in the Syntax Tab in the Database Profile Setup that wasn't checked.  The box was black, but when I clicked (off) then clicked (checked) and re-ran my query, it resolved the problem.

Comment
  1. Miguel Leeuwe
  2. Tuesday, 2 February 2021 17:13 PM UTC
great!
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 2 February 2021 17:14 PM UTC
(that IS the trimspaces option for DBParm)
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.