Do SelectAccInlist with 16,10,12,15,8,1 Procedure SelectAccInlist LPARAMETER ln1,ln2,ln3,ln4,ln5,ln6,ln7,ln8,ln9 && make sure the number is big enough LOCAL lnMax,lnCust select customer_id from Customer where .F. into cursor curCustormer && Create empty cursor lnMax=PCOUNT() for X=1 to lnMax lnCust=EVAL('LN'+LTRIM(STR(X,2,0))) select customer_id from Customer where customer_id=lnCust into cursor curTemp select curCustomer append from dbf('curTemp') endfor endproc> from Customer ;
>select customer_id ; > from Customer ; > where customer_id in (16, 10, 12, 15, 8, 1) ; > into cursor curCustormer >>