Hi ,
I have a source records like
USG12320090403145343NES2_Erc_VTTF2972.data but i need only
NES2_Erc portion . so kindly help me
Data needs to change
Moderators: chulett, rschirm, roy
Data needs to change
This records are not fixed length and all records are different and USG12320090403145343 records are fixed with NES2_Erc string [ Only applicable for this records ] .
I am given you another records like USG10420090515091147HYD_MSS3_VTTF9741.data .
Kindly help me .
I am given you another records like USG10420090515091147HYD_MSS3_VTTF9741.data .
Kindly help me .
arvind_ds wrote:Do you have all the source records of fixed length.? Is the position of NES2_Erc string same across all the records.? If yes, then use left and right functions to cut the desired portion from the input string(s).
HTH
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This is very easy with MatchField() functions and concatenation in a BASIC Transformer stage.
If you know that there are always four characters before the first underscore, then there is a solution using Index() and substrings.
If you know that there are always four characters before the first underscore, then there is a solution using Index() and substrings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
It seems you are getting date timestamp before your string.
USG12320090403145343NES2_Erc_VTTF2972.data
USG10420090515091147HYD_MSS3_VTTF9741.data
USG12320090403145343NES2_Erc_VTTF2972.data
USG10420090515091147HYD_MSS3_VTTF9741.data
Code: Select all
If this is always the same case, you could probably use something like Col1[21,Len(Field(Col1,'_',2))]
Col1 --> Your source column in Varchar format
Thanks and Regards!!
dspxlearn
dspxlearn