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: 
shane_spencer
Specialist
Specialist

Load multiple lines as a free-text field

I've got a log file that I'm trying to process. The start of each new record is "Number of executions" and the last field is "Statement text". Unfortunately this Statement text may extend to several lines but I want everything after "Statement text =" to be loaded in to a single field. I've tried several different things but have not found a solution. Is this possible?

16 Replies
shane_spencer
Specialist
Specialist
Author

Hi David, it looks like some of the Statement text is missing:

daveamz
Partner - Creator III
Partner - Creator III

I guess I figured out now. It was missing because of the text delimiter =.

shane_spencer
Specialist
Specialist
Author

Thanks David - that's great. I'm just trying to understand the scripting and have a question about this:

TextBetween(@1, '=','')

That's obviously returning the text of '@1' between the Equal Sign '=' and ''...

...does the 2 single quotes '' simply mean end of the line?

shane_spencer
Specialist
Specialist
Author

Unfortunately when I ran Log-clean.qvw against my entire log file I found it didn't concat the rows in the correct order. For example the following Statement text:

= SELECT COUNT(*) FROM (SELECT * FROM V_GENERIC_CASES_NOTES WHERE Classification = 'Enquiry/ Orders'

and (CASE_OVERVIEW LIKE

'%CHARITY COMMISSION ORDER%'

or CASE_OVERVIEW LIKE

'%Charity Commision Order%'

or CASE_OVERVIEW LIKE

'%Charity commision order%'

or CASE_OVERVIEW LIKE

'%charity commision order%'

)  AND CREATED_DATE >= ? AND CREATED_DATE <= ? AND ((ORGUNIT_ID IN (1063,1083,1084,1085,1173,1240,1252))) FETCH FIRST 15000 ROWS ONLY ) countTableAlias

Got rebuilt as:

SELECT COUNT(*) FROM (SELECT * FROM V_GENERIC_CASES_NOTES WHERE Classification = 'Enquiry/ Orders' '%CHARITY COMMISSION ORDER%' '%Charity Commision Order%' '%Charity commision order%' '%charity commision order%' )  AND CREATED_DATE >= ? AND CREATED_DATE <= ? AND ((ORGUNIT_ID IN (1063,1083,1084,1085,1173,1240,1252))) FETCH FIRST 15000 ROWS ONLY ) countTableAlias and (CASE_OVERVIEW LIKE or CASE_OVERVIEW LIKE or CASE_OVERVIEW LIKE or CASE_OVERVIEW LIKE

Therefore I combined the two scripts from and to getting a working solution.

shane_spencer
Specialist
Specialist
Author

I've just figured out that all I needed to do was add the sort-weight to the concat:

perumal_41
Partner - Specialist II
Partner - Specialist II

Hi,

PFA

daveamz
Partner - Creator III
Partner - Creator III

Yes, I used '' for end of the line. It seems qlikview can't handle '\r\n' (end of line for Windows text file).