View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 06:40 PM
Matt
 
Posts: n/a
Default Re: exporting XML files

> http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=9336
>

Trying this approach with the following code

exec ('master..xp_cmdshell"bcp "SELECT ar.artnr , ar.artbeskr FROM ar
where ar.artnr = 1445 FOR XML RAW" queryout c:\outpath\ups\ups.xml
-UXXX -PXXX -c -r -t"')

gives me the following error

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near ' queryout c:\outpath\ups\ups.xml -Usa
-P13hla -c -r -t'.


I am using SQL2000 and the bcp serion is 8+

Any ideas?

Matt
Reply With Quote