getting error when Exporting to XML using Sql server 2005

  • My statement is

    exec xp_cmdShell 'bcp SELECT * FROM reference.PERSON FOR XML RAW queryout E:\Lrmis_Kasur\UI\Reports\myfile.xml -S ZAFAR-IQBAL -U lrmis -P lrmis -c -r -t'

    Your quick response will be highly appreciated.

  • Two things:

    I think the query needs to be enclosed in quotation marks.

    And it might be helpful if you include what error message you're getting.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply