Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting Intermittent Records from Table
Message
De
13/12/2017 17:12:53
 
 
À
13/12/2017 10:02:20
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01656282
Message ID:
01656400
Vues:
56
>But then there we have better commands to do it directly on the string / file. I had this idea too, but he asks for table. :)

;-))

>>Via SQL the corresponding begin/end records can be found and ranges "in between" be deleted via single xBase or SQL command.
>>Could be faster - either via begin/end plus recno() put into 2 arrays or into a cursor to build a single delete command...
>
>How do you adress a range between records with SQL? RECNO() is not reliable. There are things that work with VFP, I agree, but I would never use this. The next code monkey tries to do gather the VFP code and use it on some SQL server ...
>Basically it's against anything SQL was made for.

Being workable only in .dbf: True of course - safest would be to use the xBase command on the table, not the SQL. Code monkey safety net ;-)
xBase quite fitting to this way of string/stream reading. Solution by Rich shortest in code and most of the work done in C-engine.
I added SQL as that was asked for in the OP and technically it is working as well in .dbf.
Feeding the text stream into a real DB with a record counter could work as well - and that would reflect the "position" aspect of the stream, so in part "tuning" SQL set usage to "stream" use case ;-))
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform