Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append headers
Message
From
02/09/2008 10:47:36
 
 
To
02/09/2008 05:24:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2008 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01344032
Message ID:
01344136
Views:
14
If I understand you correctly you need to know if a certain field name is already in your table.
You can use FIELD(“FieldNameHere”) will return an empty string if field is not in the table and if the field in the table it will return the name of the field. Something like this
IF FILED(‘F1’)=’F1’
*--field exist
ELSE
*-- not exist
ENDIF	
>hi all,
>
>if the field found at my table
>i want replace field data with another field
>if field is = space(17)
>append blank
>replace mytable title fields to new records
>
>something like below
>
>use qcombined1 excl
>ALTER table qcombined1 ADD COLUMN mnt c(17)
>
>&&if qcombined1.f1 found()&& f1 isfield name 
>scan
>replace mnt WITH f1
>
>
>IF f1=SPACE(17)
>APPEND fields name as(no,name,f1,f2........at new record
>
>if field.f2 found()
>
>replace mnt WITH f2
>
>IF f2=SPACE(17)
>APPEND fields name as(no,name,f1,f2........at new record
>
>if field.f3 found()
>replace mnt with f3
>.
>.
>.
>.
>.
>if field.f56 found()
>replace mnt with f56
>
>endif
>endif
>endif
>ENDSCAN
>
>
>thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform