Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2002
    Posts
    20

    Unanswered: Need function for padding

    Hi

    I am using Format function in my query when I was using access tables.

    Now I have imported my tables in Sql server and linked through odbc. Now in my query it throws message for "Format" function. I tried for Replicate function but still not able to get this problem.

    Same case for Date and chr.

  2. #2
    Join Date
    Feb 2003
    Posts
    109

    convert or cast

    you need to use convert or cast, not format.
    Access 2002 ADP Rocks my World

    Long live SQL Server and 64bit Windows!!!

  3. #3
    Join Date
    Feb 2003
    Posts
    109

    soundex

    it sounds like you are doing SQL Passthrough in jet against sql server, and now you need to use SQL Server syntax instead of jet/access sql.'


    cheers
    Access 2002 ADP Rocks my World

    Long live SQL Server and 64bit Windows!!!

  4. #4
    Join Date
    Feb 2002
    Posts
    5

    Re: Need function for padding

    Originally posted by eisoffind
    Hi

    I am using Format function in my query when I was using access tables.

    Now I have imported my tables in Sql server and linked through odbc. Now in my query it throws message for "Format" function. I tried for Replicate function but still not able to get this problem.

    Same case for Date and chr.
    If i understand your question correctly, you want to be able to pad the left of a number with another value. For example '555' --> '000555'

    Attached are two SQL2K UDFs to lpad and rpad.
    Attached Files Attached Files

Posting Permissions

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