|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 1:12 PM
Points: 414,
Visits: 2,250
|
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Monday, November 02, 2009 9:26 AM
Points: 3,280,
Visits: 962
|
|
Excellent article..... Thanks.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Monday, June 22, 2009 2:58 AM
Points: 25,
Visits: 21
|
|
| Very useful ! Thanks a lot
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 10, 2009 4:06 AM
Points: 6,
Visits: 28
|
|
Thanks for this great and useful article.
I have 2 questions :
1) In my result i have each 2034 character a feed line that make my xml file not XML compliant 2) how to insert at the beginning of the XML result file this line
Regards
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 1:12 PM
Points: 414,
Visits: 2,250
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 10, 2009 4:06 AM
Points: 6,
Visits: 28
|
|
With the line feed each 2034 character the XML result file can not be interpret well by other application because the line feed cut XML tag or data in element.
The line that i want to insert is ?xml version="1.0" encoding="ISO-8859-1"?
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 1:12 PM
Points: 414,
Visits: 2,250
|
|
You will have to do a string operation to do this. Look at the example given in the previous session: http://www.sqlservercentral.com/articles/XML/62661/
Jacob Sebastian, SQL Server MVP http://beyondrelational.com/blogs/jacob/
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 10, 2009 4:06 AM
Points: 6,
Visits: 28
|
|
Thanks for your answer. With the encoding information, the line feed problem was disappeared.
With UTF-8 I was an error : XML parsing: line 1, character 39, unable to switch the encoding
I must use UTF-16. For information I use SQL server 2005.
Regards
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 10, 2009 4:06 AM
Points: 6,
Visits: 28
|
|
Hello,
I have this error :
hexadecimal value 0x00, is an invalid character
I sow your answer in Microsoft forum for a same problem:
replace(description,CHAR(25),'') I used the same function : REPLACE([NewsSummary],CHAR(0),'') but that do not work.
Do you have an idea ? Regards
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: 2 days ago @ 1:12 PM
Points: 414,
Visits: 2,250
|
|
In our example, the REPLACE function is expected to remove the unwanted character (CHAR(0)). Try to run a SELECT query for the specific column and apply a REPLACE() operation and make sure those characters are removed from the query result.
if that does not work, pls post some sample data. I will have a look at it and see If i can help you with this.
regards Jacob
Jacob Sebastian, SQL Server MVP http://beyondrelational.com/blogs/jacob/
|
|
|
|