Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
i am doing binary load of my data model in my report qvw.
i want to do "order by" operation on the table which has come as part of binary load in my report qvw but it does not work.
Is there any relation between binary load and order by?
Binary data.qvw;
Txn:
Load * resident Tmp_Txn
where isnull(IsInvTable)
order by TxnId, TxnDate;
The Tmp_Txn has come from binary load.
the "where" clause works but 'order by" has no effect.
Am i missing anything here?
Saurabh
It should work,
try to order in your original document (the one you load into the second) and verify if it works!
it works if i do order by in the original one but i can not do it there because i need to binary load this file in many different report qvws and all have different requirements.
The Order By works fine, also with a Binary load. However, there is a trap...
If you do a
Load TxnId, TxnDate Resident ... Order By TxnId, TxnDate;
then the data table will be sorted correctly, but the symbol tables will not change: The old ones will be used. This means that "Sort by load order" in the UI will not be affected by the Order By.
But if you instead do a
Load TxnId as NewID, TxnDate as NewDate Resident ... Order By TxnId, TxnDate;
then both data tables and symbol tables will be new and sorted according to your demand.
See more on http://community.qlik.com/blogs/qlikviewdesignblog/2012/11/20/symbol-tables-and-bit-stuffed-pointers
HIC
i am going to try this...
few questions...
do i need to rename all columns or just those on which i am doing order by?
so after renaming these columns will be available with new name...is it right?
You need to rename the fields that you want re-ordered.
HIC
Here is my old script
Txn:
Load * resident Tmp_Txn
where isnull(IsInvTable)
order by TxnId, TxnDate;
New script
Load *, TxnId as NewID, TxnDate as NewTxnDate
where isnull(IsInvTable)
order by TxnId, TxnDate;
It is not working.
Do you think it is because of "*" used in the statement because it will bring TxnID and TxnDate as well along with NewID and NewTxnDate?
Saurabh
Two questions.
1. Unless you specify "NoConcatenate", the
Load * resident Tmp_Txn
does not create a new table, correct?
2. Why do you want to do the order by? i.e. how will you use that order?
-Rob
you try this
Txn:
noconcatenate
Load * resident Tmp_Txn
where isnull(IsInvTable)
order by TxnId, TxnDate;
drop table Tmp_Txn;
I am doing NoConcatenate in my load script. It is not shown here
I need to order by because i need to show report in a certain order....in this case it is by TxnID and TxnDate