Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

To get a string in the braces, eg: (abcdd)Tempid, I want abcdd as an outcome...

Hi

To get a string in the braces, eg: (abcdd)Tempid

I used

LOAD SubField(Name,'(',2) as Name_Der

FROM Data.xlsx (ooxml, embedded labels, table is Sheet1);

However this is giving the entire string as abcdd)Tempid, I need only abcdd as an out come, Please help me out...

1 Solution

Accepted Solutions
Not applicable
Author

try :

//-----------

Temptabel:

LOAD  Textbetween(Name,'(',')') as Name_Der,

            Name 

FROM Data.xlsx (ooxml, embedded labels, table is Sheet1);

//-----------

(Name loaded to see the result better)

View solution in original post

3 Replies
sushil353
Master II
Master II

Hi,

Try this:

subfield((SubField(Name,'(',2)),')',1)

HTH

Sushil

Not applicable
Author

try :

//-----------

Temptabel:

LOAD  Textbetween(Name,'(',')') as Name_Der,

            Name 

FROM Data.xlsx (ooxml, embedded labels, table is Sheet1);

//-----------

(Name loaded to see the result better)

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can try this expression.

     Load *,

      mid(Data,Index(Data,'(')+1,Index(Data,')')-Index(Data,'(')-1) as New_Data

     From xyz;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!