I have a large table in sql server 2008. This table have 500000 records and each records have 40 fields. Some fields are string and they contain \n and other symbols. I want to convert this table to xml file for use in project. when I use "FOR XML" to export this table, some errors are shown. for example, when test:
select testData.* from testData FOR XML PATH('sample'), Type, ELEMENTS, ROOT(TestData')
only 3500 records are converted to xml and also, final element (that is record 3500) is not complete.
when test(without Type):
select testData.* from testData FOR XML PATH('sample'), ELEMENTS, ROOT(TestData')
All of records are converted to xml but some CR/LF character added to xml file that failed xml file. so, some tag like Product split to prod CRLF uct.
I searched for a long time but no page was helpful.
No comments:
Post a Comment