Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I have a piece of code as below
Map_SS:
Load
INVOICENUMBER,
[DATE STEP CREATED DERIVED]
FROM a.QVD(qvd)
where STEPNAME='Complete PeopleSoft Process' order by [DATE STEP CREATED DERIVED] desc;
DATE_STEP_CREATED_DERIVED:
Mapping LOAD * Resident Map_SS;
drop table Map_SS;
While loading it is giving an error message stating Garbage after statement.
Could anyone please help me how to use Order by desc here?
Thanks in Advance
Sonali
Hi Sonali,
Order by is not working with ordinary load.
If you load it again as resident then it will work.
Like this
Map_SS:
Load INVOICENUMBER,
[DATE STEP CREATED DERIVED]
FROM a.QVD(qvd)
where STEPNAME='Complete PeopleSoft Process';
Load INVOICENUMBER,
[DATE STEP CREATED DERIVED]
Resident Map_SS
order by [DATE STEP CREATED DERIVED] desc;
-- Regards,
Vishal Waghole
order by does only work in resident load ![]()
so just load your table resident and drop the original
Hi Sonali,
Order by is not working with ordinary load.
If you load it again as resident then it will work.
Like this
Map_SS:
Load INVOICENUMBER,
[DATE STEP CREATED DERIVED]
FROM a.QVD(qvd)
where STEPNAME='Complete PeopleSoft Process';
Load INVOICENUMBER,
[DATE STEP CREATED DERIVED]
Resident Map_SS
order by [DATE STEP CREATED DERIVED] desc;
-- Regards,
Vishal Waghole
Order by clause will work only in the resident table then try like
Temp_Map_SS:
Load
INVOICENUMBER,
[DATE STEP CREATED DERIVED]
FROM a.QVD(qvd);
Noconcatenate
Map_SS:
Load
INVOICENUMBER,
[DATE STEP CREATED DERIVED]
Resident Temp_Map_SS
where STEPNAME='Complete PeopleSoft Process' order by [DATE STEP CREATED DERIVED] desc;
Drop Table Temp_Map_SS;
DATE_STEP_CREATED_DERIVED:
Mapping LOAD * Resident Map_SS;
drop table Map_SS;
see first answer...
HI Sonali,
And another way for this is in resident load make the table as Mapping table see the script below and try this code also.
Temp_Map_SS:
Load
INVOICENUMBER,
[DATE STEP CREATED DERIVED]
FROM a.QVD(qvd);
Noconcatenate
DATE_STEP_CREATED_DERIVED:
Mapping Load
INVOICENUMBER,
[DATE STEP CREATED DERIVED]
Resident Temp_Map_SS
where STEPNAME='Complete PeopleSoft Process' order by [DATE STEP CREATED DERIVED] desc;
Drop Table Temp_Map_SS;
Thank You All For Your Reply....
![]()
Most Welcome Sonali
![]()