Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Anyone please tell me.
Regards,
Devi
In any resident load you can sort the QVD with Order BY clause
Ex:-
QVDTab:
Load
Field1,Field2,Field3
From QVD Location;
Noconcatenate
New:
Load
Field1,Field2,Field3
Resident QVDTab
Order By Field2,Field3;
Drop Table QVDTab;
Hi,
You can use order by only in Resident load only. If you want to use order by then load QVD data into temporary table and then using resident load sort the data and then drop the temporary table. Check the script below
TempTable:
LOAD
*
FROM FileName.QVD (qvd);
Noconcatenate;
Data:
LOAD
*
RESIDENT TempTable
ORDER BY Field1, Field2;
DROP TABLE TempTable;
Hope this helps you.
Regards,
Jagan.
Hi
Order by is not directly supported. One of the reasons I see, is that order by clause may affect performance considering large amount of data in teh source.
As Jagan has pointed out, we can work on resident table to apply order by.
Hi Devi,
As you are loading data, the program does not know the nature and the size of the data you're loading, therefore it cannot sort. Once the data are 'known' to Qlikview (loaded in), then you can sort them. That's why you cannot sort while loading.
Think it this way:
Suppose, you are requested to arrange a few names alphabetically. Now I give you names one by one. When you get the first name you can't put it in an arranged way because you don't have the reference to compare the name with; where you should place that name. The arrangement approach is only be possible when you know/have all the names. Similarly, qlikview loading records are like getting data one by one. So qlikview would only be able to sort them when all values are loaded/available in the memory.
I guess, alternate could have been possible, but that could be costly in terms of memory utilization, hence QlikView avoids that.
hope this helps.