Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Snippets by SQL
Message
De
15/12/2014 07:45:12
 
 
À
15/12/2014 05:39:02
Lutz Scheffler (En ligne)
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01612276
Message ID:
01612301
Vues:
59
>>>>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...
>>
>>>
>>>How do you Select n-1 fields if you do not know the field names or number of fields (other then by AFIELDS()) ? Any SQL I miss? (And I miss a lot :D )
>>>It's just an catch-the-current-ALIAS-and-process machine. Called from everywhere. Can not alter hundreds of sources ....
>>
>>either create the SQL field list once outside the loop in the method itself on the fly and call the SQL as a macro
>>or
>>use COPY TO ARRAY FIELDS EXCEPT FOR blabla syntax if you feel exceptionally lazy and are not afraid this old xBase-way will removed in the next version ;-))
>
>You mean
>
>COPY TO ARRAY someArray NEXT NNN?
Select Recno() as  LutzMagicRowNumberfield, * ;
    from (tcSourceAlias) ;
   into Cursor "T_Tmp_" + sys(2015)
 
For lnLoop = 0 To Reccount()/tnBatch
    lnLower = 1 + lnLoop*tnBatch 
    Copy To Array For Between(LutzMagicRowNumberfield, lnLower, lnLower+tnBatch-1) Fields Except LutzMagicRowNumberfield
    *-- Move Array to Excel
Next
>
>I let you know when I stop beating myself and return from the hospital. Ouch, Ouch ....

Don't hit yourself in the eye, so that you can identify pretty nurses and forward them here....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform