Do you still need to use SETCURRENTKEY with the FINDFIRST, FINDLAST and FINDSET statement?
Depends in which order you want the records.
On SQL, it serves ONLY to define the order.
On Navision it serves to select the correct key for performance (and also ordering).
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
You can hint SQL server through SETCURRENTKEY (for example, he can change the execution schema when SQL knows that you want to order the set in some way...).
Comments
D365 Business Central Solutions Architect
BC AL/NAV C/AL Developer
BC Repositories.com
On SQL: use SETCURRENTKEY to retrieve the recordset in an ordered way. SQL doesn't use it to fetch the data.
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
On SQL, it serves ONLY to define the order.
On Navision it serves to select the correct key for performance (and also ordering).
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.