• Format function (SQL Server 2000)

    Author
    Topic
    #412089

    (Edited by charlotte on 10-Nov-04 14:46. expanded subject)

    In MS Access I can type Format([eessno],”000000000″). If the fiels eessno is form example “012345678” it return 012345678. But in SQL 2000 I can not do that. Exist a function in SQL Sevever 2000 that can do this?

    Viewing 1 reply thread
    Author
    Replies
    • #898393

      Couple of suggestions: (Obv. based on the dynamics of your data)
      To preserve the format you could
      1. Change the field type to string (text)
      2. The Format function does not exist in SQL 2000; You could experiment with the functions called STR, or STUFF.
      – STR replaces a number with the equivilent string version.
      -STUFF allows you to replace/add characters in a value to create a new value! (Use this if you want a leading 0)
      If I am out of context, please re-phrase your question with more detail, or what for more responses from other loungers!
      Cheers

    • #898394

      Couple of suggestions: (Obv. based on the dynamics of your data)
      To preserve the format you could
      1. Change the field type to string (text)
      2. The Format function does not exist in SQL 2000; You could experiment with the functions called STR, or STUFF.
      – STR replaces a number with the equivilent string version.
      -STUFF allows you to replace/add characters in a value to create a new value! (Use this if you want a leading 0)
      If I am out of context, please re-phrase your question with more detail, or what for more responses from other loungers!
      Cheers

    Viewing 1 reply thread
    Reply To: Format function (SQL Server 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: