Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 XML file - Replace a character

Author  Topic 

Bheenick
Starting Member

2 Posts

Posted - 2010-12-23 : 06:13:52
Hi everyone
Well i've got a lil situation here. I have to read an XML file from disk and then send the content in a table which contains an Xml field. My issue is that my XML file contains characters like "é", "è", ... and these prevent me from inserting the content of the file in my table.
I am including the code I am using. Ideally i just want to replace the characters "é", "è" by "e". I thank you people in advance for your help.

INSERT INTO XmlImportTest(xmlFileName, xml_data)
SELECT ' + 'C:\Temp\ORDER1.xml' + ', xmlData
FROM(SELECT * FROM OPENROWSET (BULK ' + 'C:\Temp\ORDER1.xml' + ' , SINGLE_BLOB) AS XMLDATA) AS FileImport (XMLDATA)

Impossible is nothing...
   

- Advertisement -