Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic Tables
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00392511
Message ID:
00392562
Views:
8
>I am trying to build a table using the following syntax..
>
>AA="("
>FOR I = 1 TO 200
>if i = 200
>AA=AA+'TEMP'+ALLT(STR(I))+' c(25)'
>else
>AA=AA+'TEMP'+ALLT(STR(I))+' c(25)'+' ;'+CHR(13)
>endif
>NEXT
>aa=aa+')'
> CREATE TABLE test &AA
>
>
>Any idea why it doesn't work ?
>Thanks

Adam, try this:

aa = "CREATE TABLE test ("
FOR I = 1 TO 200
IF i = 200
AA=AA+'TEMP'+ALLT(STR(I))+' c(25))'
ELSE
AA=AA+'TEMP'+ALLT(STR(I))+' c(25)'+','
ENDIF
NEXT
&aa
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform