Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Location
    India
    Posts
    56

    Unanswered: How to Remove a charater from a SQL Data.

    Dear Frineds


    I have a hyperlink datatype column in Access database.I import that column into SQL Table.

    Now my column in sql table say 'imp_cl 'have all data from Acces table.
    But all record are prefix with"#" and at the end of value also have "#".
    that means it imported in following way

    eg. #//Server/image/img1.pdf#

    Now I want to remove this # from both side.As we have around 80,000 record of same type,it is very difficult to do it record by record.

    I would like to know aay fuction ,method or programme to remove this "#" from all record.

    Thannk you


    graceson

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Code:
    DECLARE @c		NVARCHAR(200)
    
    SET @c = '#//Server/image/img1.pdf#'
    
    SELECT DataLength(@c), @c, SubString(@c, 2, Datalength(@c) / 2 - 2)
    -PatP

Posting Permissions

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