Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Can you use 'Order By' in a QVD Load?

Can you use 'Order By' in a QVD Load? It looks like my syntax is good but I get this error:

Garbage after statement

PATIENTLEVELDATA:

LOAD SURVEY_ID,

    CLIENT_ID,

    SERVICE,

    RECDATE,

    DISDATE,

    %Key_PATIENTLEVELDATA_E1A59225A73AF151   

FROM C:\QlickView\Dashboard\PATIENTLEVELDATA_4.QVD (qvd) Order By RECDATE

Tags (3)
1 Solution

Accepted Solutions
jagannalla
Valued Contributor III

Can you use 'Order By' in a QVD Load?

Coming to your data.

Temp:

Load  *

from C:\QlickView\Dashboard\PATIENTLEVELDATA_4.QVD (qvd);

PATIENTLEVELDATA:

Load  *,1 as Flag

Resident Temp Order By RECDATE;

Drop table Temp;

6 Replies
jagannalla
Valued Contributor III

Can you use 'Order By' in a QVD Load?

No you can't use Order By clause for qvd file. You can use for resident table only.

Eg:

Load A,B*C as E resident tab1 order by A;

jagannalla
Valued Contributor III

Can you use 'Order By' in a QVD Load?

Coming to your data.

Temp:

Load  *

from C:\QlickView\Dashboard\PATIENTLEVELDATA_4.QVD (qvd);

PATIENTLEVELDATA:

Load  *,1 as Flag

Resident Temp Order By RECDATE;

Drop table Temp;

Highlighted
MVP & Luminary
MVP & Luminary

Can you use 'Order By' in a QVD Load?

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);

Data:

LOAD

     *

RESIDENT TempTable

ORDER BY Field1, Field2;

DROP TABLE TempTable;

Hope this helps you.

Regards,

Jagan.

Not applicable

Re: Can you use 'Order By' in a QVD Load?

I did not realize this constraint on the ORDER BY clause: (described in Qlikview documentation) "This clause may only be used when the data source is a resident table."

Not applicable

Re: Can you use 'Order By' in a QVD Load?

Thanks for the answer!

gauravkumar131
New Contributor II

Re: Can you use 'Order By' in a QVD Load?

hey jaganand,

 

 

please check in sheet 1 and sort by key or sale whatever you take and show me the result.