General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>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
Try REPLACE ALL costcent2.old_gl_bnk with padl(ALLTRIM(old_gl_bnk),5,'0')
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only