Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ALTER TABLE Woes
Message
De
04/03/1998 04:34:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/03/1998 17:46:59
Matthew Manicolo
Circa Telecommunications
Melbourne, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00082377
Message ID:
00082430
Vues:
25
>Hi all,
> I need to use an ALTER TABLE comand and shown below where the column is a variable that changes. I need to do this so that I can create the table that I want at runtime. Is this possible because foxpro uses the actual vaiable as the column name. Can anyone help?
>
>ALTER TABLE temp_call_details ADD COLUMN variable_name C( 1)
>
>I've also tried
>
>new_variable_name = &variable_name
>ALTER TABLE temp_call_details ADD COLUMN new_variable_name c( 1)

Use name expression. That is surround the varname with parentheses.
variable_name = "Newcolumn"
ALTER TABLE temp_call_details ADD COLUMN (variable_name) C( 1)

*ALTER TABLE temp_call_details ADD COLUMN &variable_name C( 1)
* Would also work but slower, name expression is the correct way
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform