Page 1 of 1
How to use Substring_by_delimiter in DataStage?
Posted: Mon Apr 20, 2009 1:50 am
by SujeethP
Hi friends,
I facing a problem in splitting the string by delimiter.
I need to take substring that should be in between 2 commas(",")
Please help me out
Re: How to use Substring_by_delimiter in DataStage?
Posted: Mon Apr 20, 2009 2:18 am
by priyadarshikunal
SujeethP wrote:Hi friends,
I facing a problem in splitting the string by delimiter.
I need to take substring that should be in between 2 commas(",")
Please help me out
Welcome Aboard,
I think you need to use Field function. Search the forum for details.
Re: How to use Substring_by_delimiter in DataStage?
Posted: Mon Apr 20, 2009 3:07 am
by v2rao
Hi,
you can use index(), or Field() function. Search the functions by string in px development guide.
Re: How to use Substring_by_delimiter in DataStage?
Posted: Mon Apr 20, 2009 3:17 am
by sharantheboss
Hi,
Use the below function Field(col1,delimeter,instance)
In your case Field(col,',',1) will fetch record before comma deleimter
Field(col,',',2) will fetch after comma deleimter
....................... etc
Regards
BOSS
SujeethP wrote:Hi friends,
I facing a problem in splitting the string by delimiter.
I need to take substring that should be in between 2 commas(",")
Please help me out
Posted: Mon Apr 20, 2009 8:45 am
by chulett
While Index() may find it, you'll need to use Field() as noted to actually extract it. Easiest way, that is, not the only way of course.