Hi again everyone, Thanks Christoph for the feebdack on index. I have added indexes just to play safe. Another query I have is with the firstonly command. I understand basically how it works but want to know how it really works in practice Given this code: while select WMSPallet order by WMSPalletId { select firstonly InventPalletBP where InventPalletBP.PalletId == WMSPallet.wMSPalletId; } Is it better to use firstonly in such a situation? I mean I am going to be looping through pallets so if I dont use firstonly a number of inventpalletbp table records will be fetched together which in theory would be a good thing to save on database calls. But then i am wondering will the records that are fetched be in any particualr order (e.g. by palletid) or just from the same page in the SQL server? I guess it should be read ahead according to the where clause or do I need to explicitly put an order by or index command against the InventPalletBP select statement to be sure of this? Looking forward to your input Thanks James
[Non-text portions of this message have been removed]