Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Peony
Creator III
Creator III

string processing

Hi All

I have such dataset

LOAD * Inline [

Name,                Sign 
WIND-SEP19,    W
WIND-OCT18,   W
WIND,                  W
WINDY,                 D
];
 I need to process each row with the next logic:  if  there is a "-" I need to  replace Name field value till this sign.  
As the result I will have the next table 

LOAD * Inline [

Name,                Sign 
WIND,                  W

WIND,                  W

WIND,                  W


WINDY,                 D
];

Coud you, please, tell how to apply such logic it in the load script?

 

 

Labels (1)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

Try this? 

LOAD * Inline [

Name, Sign
WIND-SEP19, W
WIND-OCT18, W
WIND, W
WINDY, D
] Where Not WildMatch(Name, 'WIND-*');

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

1 Reply
Anil_Babu_Samineni

Try this? 

LOAD * Inline [

Name, Sign
WIND-SEP19, W
WIND-OCT18, W
WIND, W
WINDY, D
] Where Not WildMatch(Name, 'WIND-*');

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful