Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

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

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)

3 Replies
sushil353
Honored Contributor II

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

Hi,

Try this:

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

HTH

Sushil

Not applicable

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

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)

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

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