Hello,
I want to load following XML into one sql table .
Pls let me know, how can i load it..My XML file will be 60 MB so i want to
do BULK insert.
It is a two level of hierarchy. Project
can have multiple Activities.. so one project will have multiple Activities
rows. so in table i want to insert projid repeating for each activity
I want to insert like following. My sql table and xml is as following.
SQL TABLE
projid Aid Adesc
11142930 10000 General
11142930 10001 Accounting
XML
<?xml version="1.0" encoding="utf-8" ?>
- <ROWSET xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <PROJECT>
<PID>11142930</PID>
- <ACTIVITIES>
- <ACT>
<AID>10000</AID>
<ADESC>General</ADESC>
</ACT>
</ACTIVITIES>
- <ACTIVITIES>
- <ACT>
<AID>10001</AID>
<ADESC>Accounting</ADESC>
</ACT>
</ACTIVITIES>
</PROJECT>
</ROWSET>
Thanks,
mvpHi
Check out:
http://sqlxml.org/faqs.aspx?faq=24
http://sqlxml.org/faqs.aspx?faq=43
John
"mvp" wrote:
> Hello,
> I want to load following XML into one sql table .
> Pls let me know, how can i load it..My XML file will be 60 MB so i want to
> do BULK insert.
> It is a two level of hierarchy. Project
> can have multiple Activities.. so one project will have multiple Activitie
s
> rows. so in table i want to insert projid repeating for each activity
> I want to insert like following. My sql table and xml is as following.
> SQL TABLE
> projid Aid Adesc
> 11142930 10000 General
> 11142930 10001 Accounting
> XML
> <?xml version="1.0" encoding="utf-8" ?>
> - <ROWSET xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> - <PROJECT>
> <PID>11142930</PID>
> - <ACTIVITIES>
> - <ACT>
> <AID>10000</AID>
> <ADESC>General</ADESC>
> </ACT>
> </ACTIVITIES>
> - <ACTIVITIES>
> - <ACT>
> <AID>10001</AID>
> <ADESC>Accounting</ADESC>
> </ACT>
> </ACTIVITIES>
> </PROJECT>
> </ROWSET>
> Thanks,
> mvp
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment