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

The thing you're describing is called CrossTab. You can either do it with VFP VFPXTab or you can get FastXTab from Downloads section here.

>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
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform