Am a newbie to Datastage and am trying to make use of Filed fucntion to extract the values from a string.
Look for the first forward slash starting from the right of the string and take 4 characters to the left of the forward slash
Example Data:
NTCADTX CAD 3333/ 5930/1 ---- 5930
NTSOLDI EUR 2356/ 0001/24 ---- 0001
NTCADTX USD /478568/123/5930/1 --- 5930
Code: Select all
If IsNotNull(lnk_read_gxm_src.agent) OR Len(TrimLeadingTrailing(lnk_read_gxm_src.agent)<>0) then Right(Field(lnk_read_gxm_src.agent,'/',1) ,4) Else '-1'
What would be the correct expression for this ?