instr in datastage
Posted: Thu Oct 04, 2012 11:34 pm
Hi,
Can some one tell me how can i search a substring from behind,(i want to search for the 1st space from the end of a string)
E.g. i want to split a note of more than 100 characters into 40 chars each. While doing so i want logically split the note, that means instead of truncating at the 40th Char i want to trunacte till the last space in the 40 cars
input String = 'Can someone tell me how can i search a substring from behind'
i want the first 40 chars until the last space
Expected output= 'Can someone tell me how can i search a '
I dont want 'Can someone tell me how can i search a s'
Can some one tell me how can i search a substring from behind,(i want to search for the 1st space from the end of a string)
E.g. i want to split a note of more than 100 characters into 40 chars each. While doing so i want logically split the note, that means instead of truncating at the 40th Char i want to trunacte till the last space in the 40 cars
input String = 'Can someone tell me how can i search a substring from behind'
i want the first 40 chars until the last space
Expected output= 'Can someone tell me how can i search a '
I dont want 'Can someone tell me how can i search a s'