copy records in XML format

  • I am tr

  • I am trying to copy data from table to xml format using following command.

    DBCC traceon(257)

    select feidl1,feidl2,feild3 from table FOR XML AUTO, ELEMENTS

    following is the output which I am getting from the above query.

    <_x0023_tt1>

    <description>Assets</description>

    </_x0023_tt1>

    <_x0023_tt1>

    <description>Current Assests</description>

    </_x0023_tt1>

    <_x0023_tt1>

    I don't understand why I am getting <_x0023_tt1> in the output. I want to get rid of this thing.

    Thanks in advance

  • If I run this in Northwind, it works

    select orderid, customerid

    from orders

    for xml auto, elements

    Not sure what the issue is for you. Are you running this from QA?

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

  • Thanks Steve

    Actually, my table is in the following form.

    Assets NULLNULL

    Current Assests NULLNULL

    Cash and cash equivalents 3721.00003107.0000

    Investments 4657.00005310.0000

    Accounts receivable, net 60.00008.0000

    Inventories 607.0000381.0000

    May be <_x0023_tt1> represents null values, I am not sure.

    I did not get you when u mentioned running from QA.

Viewing 4 posts - 1 through 3 (of 3 total)

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