0

I am using query

SELECT (
SELECT * FROM TABLE_NAME
FOR XML RAW ('---'), Root('--') ) as XML

to get query result in XML then I need to copy this xml from result to in txt file, but when I try to copy it, not all the xml is copied. Query returns almost 500000 rows, when I convert it to xml and tried to copy.

Please help me how I can copy full xml.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Rizwan Ansari
  • 419
  • 9
  • 17
  • 1
    If you are running this in SSMS then you may need to [change your maximum character settings in SSMS's options](http://stackoverflow.com/a/3113402/1048425) as I think by default it will truncate the output. You could also just [export to a flat file](http://stackoverflow.com/a/7148610/1048425) avoiding the need to copy and paste. – GarethD Mar 31 '15 at 11:19
  • thanks GarethD its working. – Rizwan Ansari Mar 31 '15 at 13:12

0 Answers0