Why While select is not Fetching data by sequence in ax 2009

Here i have a big problem to complete my task

i have a table in that i need to update the row by sequence but when im using this code its not working

Tablename obj;
while select obj
info(strfmt(" before weekno is: %1",obj.Number));


in this table i have the number in sequence but when i printing the values using this while select its printing the value by shuffle manner

could u help me please???

I do not know what exactly you are trying to achieve, because how can you blindly update the table just by sequence without taking any reference like primary key or recid etc.

Thanks for your suggestion vishal

my doubt is in what sequece this while select is executing the loop

im’t having any primary key

then how its processing

while select tablename



if get answer for this i can complete my task easily kindly help me vishal

Hello Manimaranvassam,

If there is no index defined in the table. the records are being fetched based on the RecId of the table. - Check that the records are being looped basing on the RecId of that table.

If you don’t request any specific order, database server can use any order it wants (based on the index used to retrieve the data or on physical storage). If you need sorted data, use order by or index clause.

thanks martin Got idea about while select