Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I drop it?
Message
De
01/12/2013 03:56:51
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
30/11/2013 15:36:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01588891
Message ID:
01588944
Vues:
71
>>>Is the only solution creating another cursor and selecting only the needed columns from the original cursor?
>>
>>Which shouldn't be that hard:
>>
afiel(aF,"nameOfCursor")
>>lnElement=ascan(af, "myfieldname") && mind the other parameters here - case sensitivity, perhaps search only column 1
>>lnRow=asubscript(af, lnElement, 1) 
>>adel(af, lnRow)
>>dimension af(alen(af,1)-1, alen(af,2))
>>
>>create cursor newname from array af
>>append from dbf("nameOfCursor")
>
>Interesting code Dragan. It's not what I wanted to do but I appreciate the alternative.
>
>I thought about doing the following
>
>Original query would be like
>select field1, field2, FieldThatWillBeDropped from MyTable into cursor cTemp
>
>Final query would be like
>select field1, field2 from cTemp into cFinalCursor

Ah, I thought you had forty fields, and therefore a problem, or didn't even have the whole query in your hands - it may have come from a sql-side view or something, and you wanted to drop a column from that. With just a handful of fields, no big deal.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform