Trim Function

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
rajikarthick
Participant
Posts: 1
Joined: Fri Sep 05, 2014 3:30 am

Trim Function

Post by rajikarthick »

Can anyone explain what does the below function do exactly?

Trim(Col1,"",'T')
Thanks
Raji K
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Test it to find out.
Choose a job you love, and you will never have to work a day in your life. - Confucius
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

read page 658 of parallel job developer guide.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, read the documentation. This was posted as a Server function so best to check either the Server Job Developer's Guide pdf manual or use the built-in help system. It's all there.

ps. 'T' is for Trailing. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
prahul4all
Participant
Posts: 5
Joined: Wed Mar 26, 2008 1:06 am
Location: trivandrum
Contact:

Re: Trim Function

Post by prahul4all »

Hi,

The above function trims the trailing characters,Let's see an example below

Source Field Data : 'DatastageNNN'

Trim('DatastageNNN','N','T')

It will give output as 'Datastage'

After using the trim function it deletes all the Trailing 'N' characters.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Well with this answer he got what he wanted but next time he will come back if he finds trim(col1." ",'B'). Unless he reads the documentation.

So, I would suggest to read the documentation to know about the other option, even if you can't remember, you will know where to find it when you need.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply