Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alter Table ... default
Message
De
14/03/2003 10:10:43
 
 
À
14/03/2003 09:56:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00765839
Message ID:
00765851
Vues:
14
Pedro, ALTER TABLE is used to modify the structure/behaviour of the table, not its current contents. One possible solution is to execute the following for each field required:
REPLACE ALL Field1 WITH "-" FOR EMPTY(Field1)
>Hi
>
>i need alter one table , for each field caracter , if want if this field is empty then this field = "-"
>
>i think that , i can use ALTER TABLE ... DEFAULT ,
>
>but i don´t know how use this .
>Can you help me ?
>
>Example : i have this table Table1
>
>Field1 Field2
>Peter
> Brazil
>
>
>
>i want this
>
>
>Field1 Field2
>Peter -
>- Brazil
>
>
>yes , i know that i can make a lot of replaces ...
>but i think is more easy if i make
>
>
>FOR gnCount = 1 TO FCOUNT( )
>	IF Type(FIELD(gnCount) ) = "C"
>		 ALTER TABLE TEMP ;
>		ALTER COLUMN FIELD(gnCount) DEFAULT "-" && how can i do this?
>	ENDIF	
>NEXT
>
>
>
>Thanks
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform