Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

convert a numeric variable to a character variable

Discussion in 'Information Technology' started by Blinda, Jul 28, 2006.

  1. Blinda

    Blinda
    Expand Collapse
    Guest

    Hi all,

    Please help for converting a numeric variable to a character variable in
    access. Thank you.

    I have a variable name ID, it is a numeric variable,
    89
    90
    11123
    .........
    I would like to convert it to a character, if it less than five digits, then
    I need have 0s added at the beginning. it should show up like:
    00089
    00090
    11123
    .........

    Please help, thank you,

    Blinda
     
  2. Loading...

    Similar Threads Forum Date
    Sikhconvert Joins Sikh Philosophy Network! New SPN'ers Aug 28, 2016
    Jehovah's Witnesses Are Out And Converting! Blogs Jul 31, 2016
    Islam Ishna Has Converted To Islam Interfaith Dialogues Apr 1, 2016
    A Christian Missionary tried to convert me. Blogs Oct 22, 2015
    "Convert's Corner" - Ideas for Retitle? Convert's Corner Oct 21, 2015

  3. Ofer Cohen

    Ofer Cohen
    Expand Collapse
    Guest

    Try

    Format([variable], "00000")


    --
    Good Luck
    BS"D


    "Blinda" wrote:

    > Hi all,
    >
    > Please help for converting a numeric variable to a character variable in
    > access. Thank you.
    >
    > I have a variable name ID, it is a numeric variable,
    > 89
    > 90
    > 11123
    > ........
    > I would like to convert it to a character, if it less than five digits, then
    > I need have 0s added at the beginning. it should show up like:
    > 00089
    > 00090
    > 11123
    > ........
    >
    > Please help, thank you,
    >
    > Blinda
    >
    >
    >
    >
     
  4. Blinda

    Blinda
    Expand Collapse
    Guest

    Cohen,

    Thank you. I can change the numeric variable to the format of "00089", but
    it is still number not a character. I did that in the table: design view-->
    format--->\00000

    If you know how to change it to character, please show me. Thanks.

    Blinda

    "Ofer Cohen" wrote:

    > Try
    >
    > Format([variable], "00000")
    >
    >
    > --
    > Good Luck
    > BS"D
    >
    >
    > "Blinda" wrote:
    >
    > > Hi all,
    > >
    > > Please help for converting a numeric variable to a character variable in
    > > access. Thank you.
    > >
    > > I have a variable name ID, it is a numeric variable,
    > > 89
    > > 90
    > > 11123
    > > ........
    > > I would like to convert it to a character, if it less than five digits, then
    > > I need have 0s added at the beginning. it should show up like:
    > > 00089
    > > 00090
    > > 11123
    > > ........
    > >
    > > Please help, thank you,
    > >
    > > Blinda
    > >
    > >
    > >
    > >
     
  5. hbinc

    hbinc
    Expand Collapse
    Guest

    Blinda,

    There is a VisualBasic-function CStr that converts almost any variable
    to text.

    Hbinc.



    Blinda schreef:

    > Cohen,
    >
    > Thank you. I can change the numeric variable to the format of "00089", but
    > it is still number not a character. I did that in the table: design view-->
    > format--->\00000
    >
    > If you know how to change it to character, please show me. Thanks.
    >
    > Blinda
    >
    > "Ofer Cohen" wrote:
    >
    > > Try
    > >
    > > Format([variable], "00000")
    > >
    > >
    > > --
    > > Good Luck
    > > BS"D
    > >
    > >
    > > "Blinda" wrote:
    > >
    > > > Hi all,
    > > >
    > > > Please help for converting a numeric variable to a character variable in
    > > > access. Thank you.
    > > >
    > > > I have a variable name ID, it is a numeric variable,
    > > > 89
    > > > 90
    > > > 11123
    > > > ........
    > > > I would like to convert it to a character, if it less than five digits, then
    > > > I need have 0s added at the beginning. it should show up like:
    > > > 00089
    > > > 00090
    > > > 11123
    > > > ........
    > > >
    > > > Please help, thank you,
    > > >
    > > > Blinda
    > > >
    > > >
    > > >
    > > >
     

Share This Page