Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Snippets by SQL
Message
From
15/12/2014 04:53:19
 
 
To
15/12/2014 03:42:39
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01612276
Message ID:
01612289
Views:
58
>>>
>>>I have a generic table, I know nothing about it then taht wahta I could read via VFP functions.
>>>
>>>In special:
>>>-no order
>>>-no index
>>>
>>>I need to move this into an excel spread sheet.
>>>I do this with an array to write into Excel
>>>Now the table is a bit large, so I get OLE Errors.
>>>
>>>Should not be a problem, I can write in chunks.
>>>
>>>But now I need to chunk the table
>>>Like (example)
>>>First 100 recs
>>>Next 100 recs
>>>....
>>>Last recs
>>>
>>>Is there a way to do this with VFP SQL (note: no chance for SELECT TOP, no ORDER given ...)
>>>Any other idea how to do this?
>>
>>as it is a vfp table, add a bracket to WHERE into which recno() has to be BETWEEN, and increment bracket borders in a loop
>
>
>Was there not something to not use RECNO() / RECCOUNT() in SELECT SQL? Do you think it's thrustworthy?

yes on single source-table operations

>
>It's a single cursor, it should not be a filterd SELECT SQL (What would be worst).

If it is a single cursor, why don't you build that cursor with an explicit rownum added to the end (which will force it to be physical as well) and select n-1 fields from the cursor if you really don't trust recno() of the cursor - still easy to generalize for different table structures for automatic processing, as long as source table has not max fields.

function parameters inAliasOrName, OutFile,Stepsize

and you have no problems in the future...

regards

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform