存储过程中有句
- SQL code
Select @xml='<?xml version="1.0" encoding="UTF-8"?>'+Cast(@xml as Varchar(Max))
用exec master..xp_cmdshell方法导出,打开导出后的文件没有<?xml version="1.0" encoding="UTF-8"?>这一行,其他导出内容都正确,请问如何在导出的XML文件中加上<?xml version="1.0" encoding="UTF-8"?>这一行?
------解决方案--------------------
- SQL code
Select @xml='<?xml version="1.0" encoding="UTF-8"?>'select @[email protected]+Cast(@xml as Varchar(Max))