Monday, March 26, 2012

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

gracesonDECLARE @.c NVARCHAR(200)

SET @.c = '#//Server/image/img1.pdf#'

SELECT DataLength(@.c), @.c, SubString(@.c, 2, Datalength(@.c) / 2 - 2)
-PatP

No comments:

Post a Comment