Find String

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ppavani_km
Participant
Posts: 11
Joined: Mon Mar 17, 2008 3:14 pm

Find String

Post by ppavani_km »

I have the input coloumn data as 24100.500,I need to change this coloumn as 24100 i.e i need to get only the characters that are before . symbol.can any body tell me what string function do we need use to get this.
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

The 'Field' function should be able to do this. I don't remember the syntax, But it has the delimiter, the field number and the input string as its arguments.

Field(ip.string,'.',1)
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

You can also use the

Code: Select all

AsInteger
Function. you may need to handle the possibility of nulls in input field.

You can keep the output column as data type Integer.



You can also use a modify stage with conversion specification using

Code: Select all

int32_from_decimal()
ppavani_km
Participant
Posts: 11
Joined: Mon Mar 17, 2008 3:14 pm

Re: Find String

Post by ppavani_km »

Thanks Minhajuddin it is working.
ppavani_km wrote:I have the input coloumn data as 24100.500,I need to change this coloumn as 24100 i.e i need to get only the characters that are before . symbol.can any body tell me what string function do we need use to get this.
Post Reply