Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

josephinetedesc
Contributor III

syntax in Qlikview for using "order by"

https://community.qlik.com/message/197287#197287

Hi All

I currently get a qlikview document to work by running the SQL, then creating a QVD file.  I want to sore the QVD file according to Person ID.  (Currently I make it an Excel file and sort it according to personID)

Directory;

LOAD

     PersonID,

     dateCT,

     dateQA

FROM

[Table3.qvd]

(qvd)

//ORDER BY PersonID, dateCT

;

The sql that I run to get the table sorted is shown below - then I copy this into an Excel file:

SELECT *

FROM vw_tableOfDates

ORDER BY PersonID, dateCT

;

Is there an easier way of doing this?  Order by does not work in QlikView?

Thank you for any help.

Jo

1 Solution

Accepted Solutions
MVP
MVP

Re: syntax in Qlikview for using "order by"

Order By works in QlikView. It is just that you have to use it with Resident load. Try like:

Temp:

LOAD

     PersonID,

     dateCT,

     dateQA

FROM

[Table3.qvd]

(qvd);

NoConcatenate

Fina:

LOAD

     PersonID,

     dateCT,

     dateQA

Resident Temp ORDER BY PersonID, dateCT ;

Drop table Temp;

4 Replies
MVP
MVP

Re: syntax in Qlikview for using "order by"

Order By works in QlikView. It is just that you have to use it with Resident load. Try like:

Temp:

LOAD

     PersonID,

     dateCT,

     dateQA

FROM

[Table3.qvd]

(qvd);

NoConcatenate

Fina:

LOAD

     PersonID,

     dateCT,

     dateQA

Resident Temp ORDER BY PersonID, dateCT ;

Drop table Temp;

josephinetedesc
Contributor III

Re: syntax in Qlikview for using "order by"

ok ... sort of

if I have a calculated field that depends on Previous function - I would need to use it in the Fina table load?

Jo

MVP
MVP

Re: syntax in Qlikview for using "order by"

Yes.

josephinetedesc
Contributor III

Re: syntax in Qlikview for using "order by"

It worked - thank you! thank you!

Jo