Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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.
This is a tricky one.
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.
just refer qlikview manual it contain logic for insert, update and delete of record in QVD.
thanx, nice short script.