Trying to insert into a field that is varchar(20) but I want to pad the
entry with "0" on the beginning of it... so if the item to be written is 10
chars long I want to write 10 "0" on the front of the item.. how to
accomplish?
Thanks
--
Austin Henderson <><
Network Administratorprint replicate('0',20 -len('microsoft')) + 'microsoft'
--
gani
"Austin Henderson" <kahenderson@.firstfleetinc.NOSPAM.com> wrote in message
news:u06WsobcDHA.652@.tk2msftngp13.phx.gbl...
> Trying to insert into a field that is varchar(20) but I want to pad the
> entry with "0" on the beginning of it... so if the item to be written is
10
> chars long I want to write 10 "0" on the front of the item.. how to
> accomplish?
> Thanks
>
> --
> Austin Henderson <><
> Network Administrator
>|||Got it THANKS!
--
Austin Henderson <><
Network Administrator
"gani" <a@.a.com> wrote in message
news:Ow8oA5bcDHA.1540@.tk2msftngp13.phx.gbl...
> print replicate('0',20 -len('microsoft')) + 'microsoft'
> --
> gani
>
>
> "Austin Henderson" <kahenderson@.firstfleetinc.NOSPAM.com> wrote in message
> news:u06WsobcDHA.652@.tk2msftngp13.phx.gbl...
> > Trying to insert into a field that is varchar(20) but I want to pad the
> > entry with "0" on the beginning of it... so if the item to be written is
> 10
> > chars long I want to write 10 "0" on the front of the item.. how to
> > accomplish?
> >
> > Thanks
> >
> >
> > --
> > Austin Henderson <><
> > Network Administrator
> >
> >
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment