Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Table String Too Long?
Message
 
To
27/03/1998 12:55:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00087734
Message ID:
00087756
Views:
25
>>I have a Create table statement which creates a table of about 200 fields. I keep getting a syntax error and I'm guessing it is because the line is so long. How do I use create table when I have a long list of fields?
>
>
>Use the ALTER TABLE command for each field that you can't fit into the original CREATE TABLE statement...For example:
>
>CREATE TABLE test (name C(40), address C(40))
>
>*** Table has two fields/columns
>
>ALTER TABLE test ADD phone C(14)
>
>*** Table now has three fields/columns
>
>Unfortunately, you need a separate alter table command for each additional field.

Thanks. Great idea. Actually, since I was using a memo field to hold the structures this give me a good idea. Use the create table command to create the table with the first field and then iterate through the memo field lines using the alter table add command. Hmm..I guess alternatively I could just copy all the lines into an array and use create table from array.

Michael G. Emmons
memmons@nc.rr.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform