Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to insert rows on load?

Hello,

As you can see in the attached application we are trying to add a new row to the orginal data containg a calculation between two orignal rows.

This example works but is not pretty, for large quantity of data you probably would like to do this in one load.

Is that possible?

Thanks in advance!

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

My large loads are usually from QVDs. I want those loads to be optimized. Therefore, I wouldn't want to add the additional rows as part of the main load, even if it's possible. So my recommendation is just to streamline your three succeeding loads into one:

CONCATENATE (MainTable)
LOAD
'3.1' as Question
,sum(if(Question=4,Answer,if(Question=3,-Answer))) as Answer
,City
,Unit
RESIDENT MainTable
GROUP BY City, Unit
;

Technically you don't have to say concatenate since it's the same list of fields, but I always like to be explicit.

View solution in original post

4 Replies
Not applicable
Author

This is a tricky one.

johnw
Champion III
Champion III

My large loads are usually from QVDs. I want those loads to be optimized. Therefore, I wouldn't want to add the additional rows as part of the main load, even if it's possible. So my recommendation is just to streamline your three succeeding loads into one:

CONCATENATE (MainTable)
LOAD
'3.1' as Question
,sum(if(Question=4,Answer,if(Question=3,-Answer))) as Answer
,City
,Unit
RESIDENT MainTable
GROUP BY City, Unit
;

Technically you don't have to say concatenate since it's the same list of fields, but I always like to be explicit.

suniljain
Master
Master

just refer qlikview manual it contain logic for insert, update and delete of record in QVD.

Not applicable
Author

thanx, nice short script.