Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ALTER n(7) to c(6) and pad with leading zeros
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
ALTER n(7) to c(6) and pad with leading zeros
Divers
Thread ID:
00529975
Message ID:
00529975
Vues:
50
I need to alter a numeric table field to be a character field and I want to pad it with leading zeros. I tried the REPLACE ALL but because the length of old_gl_bnk is always the size of the table field, nothing is padded. Any ideas?

ALTER TABLE costcent2 ALTER COLUMN old_gl_bnk C(5)
REPLACE ALL costcent2.old_gl_bnk with padl(old_gl_bnk,5,'0')

Brenda
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform