How to take first 10 charectors from the input column

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
pgsivareddy
Participant
Posts: 3
Joined: Tue Apr 26, 2011 8:49 am
Location: bangalore

How to take first 10 charectors from the input column

Post by pgsivareddy »

Hi,

How to get only the first 10 charectors from the given input column.

Thanks,
Siva.
Siva P
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

Code: Select all

Left(InLink.TheColumn, 10)
Left() is a Function in the String category.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tbharathkumar
Participant
Posts: 26
Joined: Mon Aug 27, 2007 6:27 am
Location: Des Moines

Re: How to take first 10 charectors from the input column

Post by tbharathkumar »

you can also use DSLink3.name[1,10]
Regards,
Bharath Tipirisetty
Sampath
Participant
Posts: 21
Joined: Tue Apr 05, 2005 2:03 am

Re: How to take first 10 charectors from the input column

Post by Sampath »

Use Substring [1,10]
Regards,
Sampath
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: How to take first 10 charectors from the input column

Post by ray.wurlod »

Sampath wrote:Use Substring [1,10]
Incorrect syntax - this one won't work.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply