|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 10, 2009 4:06 AM
Points: 6,
Visits: 28
|
|
Thanks for your suggestion, the result of this test is incredible :
With a SELECT the 0x00 character is not present and after use a FOR XML EXPLICIT the 0x00 character magically appears at the end of a CDATA element like this ...0x00]]><... I tried to force other column to CDATA but nothing appends. The column which cause this problem have as Data Type text, and store HTML code.
have you already see that ?
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Saturday, May 11, 2013 8:17 AM
Points: 460,
Visits: 2,521
|
|
could you post some script that reproduces the problem?
.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 10, 2009 4:06 AM
Points: 6,
Visits: 28
|
|
The SELECT :
SELECT 1 as Tag, null as Parent, [NewsTitle], [NewsSummary], LEFT(DATENAME(dw, [NewsDate]),3) + ', ' + STUFF(CONVERT(nvarchar,[NewsDate],113),21,4,' GMT') FROM [sd_News] WHERE [IDChannel] = '11'
With the FOR XML :
SELECT 1 as Tag, null as Parent, [NewsTitle] as [item!1!title!ELEMENT], [NewsSummary] as [item!1!description!CDATA], LEFT(DATENAME(dw, [NewsDate]),3) + ', ' + STUFF(CONVERT(nvarchar,[NewsDate],113),21,4,' GMT') as [item!1!pubDate!ELEMENT] FROM [sd_News] WHERE [IDChannel] = '11'
FOR XML EXPLICIT
After some tests, it seems that the problem occurs when the HTML data store in the column NewsSummary is very important.
Regards.
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Saturday, May 11, 2013 8:17 AM
Points: 460,
Visits: 2,521
|
|
Hi, It does not really help because I have no way to run it and see the problem. Meanwhile, my only guess is that something is going wrong with your REPLACE() function. You should be able to remove a character by using the REPLACE() function correctly.
.
|
|
|
|