来一个笨办法
Select * From ls2 Where .F. Into Table aa
For i=1 To 500
For ii=20 To 1 Step -1
Select * From ls2 Where xh=i And bh=ii Into Cursor linshi
Select aa
Append From Dbf('linshi')
Select * From ls2 Where xh=500+i And bh=ii Into Cursor linshi
Select aa
Append From Dbf('linshi')
Endfor
Endfor
Select aa
Browse