Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Jan 2001
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Format function (SQL Server 2000)

    <P ID="edit" class=small>(Edited by charlotte on 10-Nov-04 14:46. expanded subject)</P>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?

  2. #2
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Format function (SQL Server 2000)

    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
    Regards,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •