Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Read .log file dynamically

Hi qlikers,

I have an issue reading .log file. When i want to read xKULLANICI there are several lenghts before "_" character. Is there any option to read data dynamıcally? Ex, when BEGUMT is 6 char length, read 6; BATUHANK is 8 char length, so ıt has to read 8 char before the "_" char.

1.PNG

Thank you folks.

1 Solution

Accepted Solutions
Not applicable
Author

I use and it works. Thank you!

SubField([@59:N], '_', 1) AS xKULLANICI

View solution in original post

7 Replies
maxgro
MVP
MVP

subfield

load *, subfield(xKULLANICI, '_', 1) as Before_ inline [

xKULLANICI

BATUHANK_502083/N

BATUHANK_502263/N

BEGUMT_0000000

Berkant_65837432

]

;

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Data:

LOAD

*,

SubField(xKULLANICI, '_') AS NewFieldName

FROM DataSource;

Hope this helps you.

Regards,

jagan.

Not applicable
Author

There are lots of people in this list. So, that not an optimal solution for me but thanks for answer, i'll like it.

Not applicable
Author

I use and it works. Thank you!

SubField([@59:N], '_', 1) AS xKULLANICI

avinashelite

Try with subfield() function.

Load *,

subfield(xKULLANICI, '_', 1)  as field1,// this will give the data before _ i.e. position 1

subfield(xKULLANICI, '_', 2)  as field2,// this will give the data after  _ i.e position 2

subfield(xKULLANICI, '_')  as field3, //if you don't specific the position than it will load all the data i.e before and after _

Not applicable
Author

123.PNG

oknotsen
Master III
Master III

If your question is now answered, please flag the Correct Answer and optionally Helpful Answers.

If not, please make clear what part of your question you still need help with .

May you live in interesting times!