Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: delete first space

  1. #1
    Join Date
    Apr 2017
    Posts
    3

    Default delete first space

    Hi,

    i want to delete the first space for all cells in one column.

    The data typ of the column is string. I am using "sting operation". here i select: trim type = left and remove special character = space.
    But with this settings all spaces will be deleted. i just want so delete the first space.

    Thx :-)

  2. #2
    Join Date
    Nov 2009
    Posts
    688

    Default

    If you only want to check first character you can use a formula for that: if(left([field];1)=" ";right([field];len([field])-1);[field])
    this will check if first character is space and then remove the first character. When first character is no space nothing happened

  3. #3
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Don't use "Remove special character", then.
    Left-trimming alone should do the trick.
    So long, and thanks for all the fish.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.