Unusual scenario in datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 152
- Joined: Mon Mar 07, 2011 6:16 am
Unusual scenario in datastage
I am facing one peculiar problem.In my source I have fixed length file.In a transformer I have taking out the various fields with proper length.
Now let say I have taking out one column and it is space.Now if I apply trim and write only that field in a dataset then one space is there instead of empty.But if we write any other column with that then it is working properly,it's coming as empty.
Can you please help me on this?
Now let say I have taking out one column and it is space.Now if I apply trim and write only that field in a dataset then one space is there instead of empty.But if we write any other column with that then it is working properly,it's coming as empty.
Can you please help me on this?
Soumya
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 152
- Joined: Mon Mar 07, 2011 6:16 am
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
-
- Participant
- Posts: 152
- Joined: Mon Mar 07, 2011 6:16 am
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
I think that that statement is incorrect.ray.wurlod wrote:Trim(many spaces) always returns one space, not none. This is documented behaviour.
Code: Select all
Len( Trim( ' ' ) )
Phil.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
Thanks Phil!!
I believe returns no spaces.( i feel this is the usual behavior of trim).
I believe
Code: Select all
trim(many spaces)
pandeeswaran
-
- Premium Member
- Posts: 353
- Joined: Mon Jan 17, 2011 5:03 am
- Location: Mumbai, India
-
- Premium Member
- Posts: 353
- Joined: Mon Jan 17, 2011 5:03 am
- Location: Mumbai, India
@Pandeesh
The following example will make you understand
The following example will make you understand
Code: Select all
trim(' IBM DataStage ') = 'IBM DataStage'
Thanx and Regards,
ETL User
ETL User
yes Chandra!!
Its clearly derived that
Its clearly derived that
Code: Select all
trim(many spaces)-->No spaces(leading and trialing ,not a single occurrence even).
This is what initially phil claimed!
pandeeswaran
-
- Premium Member
- Posts: 353
- Joined: Mon Jan 17, 2011 5:03 am
- Location: Mumbai, India