Quantcast
Channel: Data Preparation & Blending discussions
Viewing all articles
Browse latest Browse all 4999

Take the first and the last character to create key

$
0
0

 

Hi. I'm looking for a function which can create key for may data- Taking the first charater, taking the last character plus the lenght of the string.

 

Example

 

Data Field           Key

Data Guy--->        DY7

Subarbun--->       SN8

SA DOR DON--->SN8

 

In short

A)if there is only a single word (Subarubun), take the first character then take the last character measure the lenght then concatenate them= SN8

B)if there are two strings of text (Data Guy), take the first character of the first string(Data), then take the last character of the last string (Guy), measure the lenght then concatenate them=DY7 (since data guy is 7 character without space)

 

Thanks

 


Viewing all articles
Browse latest Browse all 4999

Trending Articles