Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm loading a table from QVD and added the sorting specifications, but I'm getting the error message "Garbage after statement".
Could someone explain? Please see the script below. Thanks.
AttTrans:
LOAD TransType,
DTPunchDate,
AttHours,
EmpID,
BusinessUnit,
DeptNo,
DeptName,
WorkCenter,
PayGroup,
AbsenceYN,
ParentTrans,
AttendanceRevision,
TardinessRevision,
AttCategory
FROM
C:\QlikViewDocuments\Transf\Attendance\AttTrans.qvd
(qvd)
Order by DTPunchDate asc;
Hi,
I reproduced your error and it is very strange. I'd say it is a bug.
As a workaround, if you really need your order by, you can load your table then use a load resident to order it.
It will be like this:
AttTrans:
LOAD TransType,
DTPunchDate,
AttHours,
EmpID,
BusinessUnit,
DeptNo,
DeptName,
WorkCenter,
PayGroup,
AbsenceYN,
ParentTrans,
AttendanceRevision,
TardinessRevision,
AttCategory
FROM
C:\QlikViewDocuments\Transf\Attendance\AttTrans.qvd
(qvd);
noconcatenate
temp:
Load * resident AttTrans
Order by DTPunchDate asc;
drop table AttTrans;
rename table temp to AttTrans;
Hope it helps,
Erich
Hi,
I reproduced your error and it is very strange. I'd say it is a bug.
As a workaround, if you really need your order by, you can load your table then use a load resident to order it.
It will be like this:
AttTrans:
LOAD TransType,
DTPunchDate,
AttHours,
EmpID,
BusinessUnit,
DeptNo,
DeptName,
WorkCenter,
PayGroup,
AbsenceYN,
ParentTrans,
AttendanceRevision,
TardinessRevision,
AttCategory
FROM
C:\QlikViewDocuments\Transf\Attendance\AttTrans.qvd
(qvd);
noconcatenate
temp:
Load * resident AttTrans
Order by DTPunchDate asc;
drop table AttTrans;
rename table temp to AttTrans;
Hope it helps,
Erich
Nice solution, thanks!
Nice solution, thanks!
Hi,
Nice Solution, Thanks.
But am surprised, this is still an issue in QlikView 11.2 as well. Can somebody from Qlik have a dig at this please? Thanks.
Thanks & Regards,
Raajesh N
It says in the Help screen (and therefore, I would assume, the user guide) for the LOAD command, "order by is a clause used for sorting the records of a resident table before they are processed by the load statement" I would suggest that Order By is working as intended.