Hi Everyone I have got new problem,
Earlier I thought of first name and last name only
Now I have prob with middle name
For example:
From the source I am getting a name called "kenneth charlie Browne"
in the transformer the name should get split into only two columns called first name and last name
In the first name column "kenneth"
In the last name column"Browne"
Can any one throw soe light on this
I am using Index and field function
but in the last name column I am getting "charlie browne" but I want only the last name"Browne"
thanks for your time
first name and last name
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 57
- Joined: Sat Jun 09, 2007 1:14 am
- Location: chicago
first name and last name
Hi I have experience in parallel extender datastage I am ready to give/take help from other
hope we all help each other hand in hand
hope we all help each other hand in hand
Use to get the number of space-delimited words, then use to get the last "word".
p.s. Corrected mistyping of the FIELD function, the original post mistakenly used INDEX. Thanks JoshGeorge for bringing that up.
Code: Select all
DCOUNT(In.ColumnName,' ')
Code: Select all
FIELD(In.ColumnName,' ',DCOUNT(In.ColumnName,' '))
p.s. Corrected mistyping of the FIELD function, the original post mistakenly used INDEX. Thanks JoshGeorge for bringing that up.
Last edited by ArndW on Thu Oct 25, 2007 12:01 am, edited 1 time in total.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
You can use Field function this way
Field({InputString},{Delimiter},{Position},[{NumberOfFields}])
Code: Select all
First Name: Filed(Input.Field,' ',1,1)
Last Name: Field(Input.Field,' ',Count(Input.Field,' ')+1,1)
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>