Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alter new field on the fly
Message
From
28/02/2006 16:56:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Alter new field on the fly
Miscellaneous
Thread ID:
01100158
Message ID:
01100158
Views:
57
Hi all,

I have mytable.dbf that contains 2 fields : empno , taxamount

mytable.dbf
empno taxamt
11111 10
11111 20
11111 30
11111 40
11111 50

22222 10
22222 20
22222 30
22222 40
22222 50

instead of having 10 records in mytable.dbf but
I would like to get mynewtable as 6 fields with only 2 records:

mynewtable.dbf
empno tax1 tax2 tax3 tax4 tax5

11111 10 20 30 40 50
22222 10 20 30 40 50
Select 0
Use mytable Exclusive
Copy Structure To mynewtable

Select 0
Use mynewtable Exclusive

Alter Table mynewtable Add Column tax1 N(5)
Alter Table mynewtable Add Column tax2 N(5)
Alter Table mynewtable Add Column tax3 N(5)
Alter Table mynewtable Add Column tax4 N(5)
Alter Table mynewtable Add Column tax5 N(5)

** from here I would like to get to insert an empno 11111 and 5 new taxes in mynewtable.dbf in first row
**and an empno 22222 and 5 new taxes in mynewtable.dbf in second row and so on....
Anyone can assist to fix my codes in order to get that result.
TIA
Next
Reply
Map
View

Click here to load this message in the networking platform