Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop columns & rename column names
Message
 
À
24/09/2003 02:25:07
Harro Schippan
Datentechnik Schippan Gmbh
Düsseldorf, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00831341
Message ID:
00831757
Vues:
14
Hi again Harro,
here is the another solution meanwhile many thanks to Cetin BASOZ for this code..

TIA
CLOSE ALL
CLEAR all
SET SAFETY OFF 

IMPORT FROM c:\cs_03-06.xls TYPE xl8
BROWSE TITLE "ilk import edilen hali"
Go 1
Scatter to arrFields
For ix=1 to Fcount()
    lcFrom = Field(ix)
    lcTo = arrFields[ix]
	Alter Table cs_03-06 rename column &lcFrom to &lcTo
ENDFOR
DELETE 
pack
BROWSE TITLE "son hali"


ldStart = {^2003/09/15}
ldEnd = {^2003/09/20}


lcStart = '_'+Dtoc(ldStart,1)
lcEnd   = '_'+Dtoc(ldEnd,1)
lcFields = ''
For ix = 1 to Fcount()
	If Field(ix) # '_' or Between(Field(ix),lcStart, lcEnd)
		lcFields = lcFields + ;
		 Iif(Empty(lcFields),'',',')+Field(ix)
	endif
EndFor

*lcstandartflds='orderno,fiyatlar'+','
*lcfinal=lcstandartflds + lcFields
Select &lcFields from cs_03-06 INTO CURSOR CrsFinal
brow
USE IN crsfinal
CLOSE TABLES all
DELETE FILE cs_03-06.dbf
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform