Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Could you please help how to resolve below issue in QlikView Script?

Thanks,
Lawrance A
Thanks for all your response.
I got expected result by using my below script.
NoConcatenate
Temp:
LOAD Distinct ID,
Status
FROM
[tab2.qvd]
(qvd) where len(ID)>0;
For i=1 to 188
NoConcatenate
Concatenate(Temp)
LOAD Distinct ID$(i) as ID,
Status$(i)
FROM
(qvd) where len(ID)>0;
NEXT i
Thanks,
Lawrance A
This might interest you as a much more optimized solution which is also totally flexible on how many columns the source QVD contains:
TEMP:
LOAD
// Get the ID from previous row if on an even numbered row.
If( Mod(RowNo(),2) = 0 , Peek('ID'), @1 ) AS ID,
@1 AS Status
FROM
tab2.qvd (qvd,filters(Transpose());
DATA:
NOCONCATENATE LOAD
ID,
Status
RESIDENT
TEMP
WHERE
// remove every odd numbered row since they are not necessary anymore
Mod(RecNo(),2) = 0 AND Len(ID)>0;
DROP TABLE TEMP;
If the question has been answered please mark the right response as CORRECT and if you feel like it give all the persons that were helpful a HELPFUL tag on their responses too.
Thanks