2012 Jan 09 1:55 PM
Hi All,
while fetching data from AFRU table with select query , Normally for most of the orders Data fetched is in Ascending order of order No and Operation No.But in Some cases it not happening . I want to know Why in some cases its not happening.
Regards,
PradeepM.
Hi All,
while fetching data from AFRU table with select query , Normally for most of the orders Data fetched is in Ascending order of order No and Operation No.But in Some cases it not happening . I want to know Why in some cases its not happening.
Regards,
PradeepM.
2012 Jan 09 2:25 PM
Don't rely on any fixed order when reading data from a relational database. If your process requires a fixed order, you need to ensure it by using the ORDER BY option of the SELECT statement or by sorting the data inside internal tables.
As for the "why", I assume a potential reason is the chronological sequence in which the records are inserted into the DB.
Thomas
2012 Jan 17 11:13 AM
Hi Pradeep,
Avoid using 'order by' as it would degrade the performance.
Instead take data into internal table and then you can sort according to the desired fields.
<begging removed by moderator>
Edited by: Thomas Zloch on Jan 17, 2012
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |