Page 1 of 1

String Handling

Posted: Thu Jan 11, 2007 7:09 pm
by saur_classic
Hi,

I am facing difficulties in extract the last portion from the URL string
for e.g.
Source sends "root^xhtmlmp^samsung(xhtml)^samsungsgh-a701" and we need "samsungsgh-a701" from it.

Does Datastage provides any Function to do the above job?

Saur

Posted: Thu Jan 11, 2007 7:23 pm
by DSguru2B
Use Dcount and Field. Something like

Code: Select all

Field(InLink.RecIn, "^", DCOUNT(In.Col,"^"))

Posted: Thu Jan 11, 2007 9:04 pm
by ray.wurlod
If DCount() does not work in the expression, use Count().

Code: Select all

Field(InLink.RecIn, "^", Count(In.Col,"^")+1, 1)