Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
Can we apply Order by clause in the
without resident Table statement.
Would be able to share an example of script you are trying to implement?
Hi,
The answer to my knowledge is NO. You can only use Order By clause in a resident table and simply because you can't use Order By in the table where you're loading from the main source.
NO we cannot do .
k Thanks
Currently I don't have any example
If you have got the answer mark the correct answer and close this thread, it will be helpful for other who are having the same question
we can do in scripting. But we can do on object Sort.
No We can't use Order By other than Resident load as per my understanding.
The ORDER BY Statement orders data ASC/DESC,if order by is used for other
than Resident load it might not order properly as it will be working as data is loaded.
to work properly and order correctly,the whole data should be in memory.
Regards
Neetha
Hi some example i have gone through ,pls have a look,
The GROUP BY statement is used in conjunction with the aggregate functions to group the Data by one or more columns.
Ex:
Load
A,
Sum(B) as B,
Max(Date) as Date,
D on
From Table
Group by A,D;
Fields used in aggregations should not be used in same statement again else users will get invalid expression You must not include fields aggregate in group by.
Try to avoid fields in load statement which are not included in group by
The ORDER BY statement orders data ASC/DESC.by default its ascending
//ASC
LOAD
Key,
Year,
Month,
ID,
Job
RESIDENT Temp1
ORDER BY ID, Year, Month;
//DESC
LOAD
Key,
Year,
Month,
ID,
Job
RESIDENT Temp1
ORDER BY ID, Year, Month DESC ;//month is ordered descending.
thanks,
Bunny