ChrisRChamberlain
Programmer
Hi all
It's Friday and am suffering from brain failure.![[sad] [sad] [sad]](/data/assets/smilies/sad.gif)
The following code selects records 180 to 200 from the query but in descending order.
All that's required is to select the records in ascending order within the SELECT... code block
Presumably another WHERE... etc?
TIA
![[pc2] [pc2] [pc2]](/data/assets/smilies/pc2.gif)
PDFcommander.com
PDFcommander.co.uk
It's Friday and am suffering from brain failure.
![[sad] [sad] [sad]](/data/assets/smilies/sad.gif)
The following code selects records 180 to 200 from the query but in descending order.
All that's required is to select the records in ascending order within the SELECT... code block
Code:
[COLOR=blue]lnRows = 20
lnOffset = 200
SELECT TOP lnRows company;
[tab]FROM C:\tables\contacts;
[tab]WHERE company IN;
[tab](SELECT TOP lnOffset company FROM C:\tables\contacts ORDER BY company ASC);
[tab]ORDER BY company DESC;
[tab]INTO CURSOR temp[/color][COLOR=green] && Correct records in reverse order[/color]
TIA
FAQ184-2483 - answering getting answered.
Chris ![[pc2] [pc2] [pc2]](/data/assets/smilies/pc2.gif)
PDFcommander.com
PDFcommander.co.uk