special way of inserting XML data

  • Is there any special way of inserting XML data into SQL server / DB2 native XML database using XQuery? If so let me know. I tried with CAST function. Will it raise any performace issue if the size of the XML if too big?

  • Please clarify what you're looking for.

    "inserting XML data into SQL server / DB2 native XML database" is really confusing as far as I can see...

    A brief description of the process flow would help a lot.

    Something like (example):

    Source: flat file with xml data in a folder (example attached)

    Target: SQL Server table (table def included)



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • sridevi_mahalingam (6/23/2009)


    Is there any special way of inserting XML data into SQL server / DB2 native XML database using XQuery? If so let me know. I tried with CAST function. Will it raise any performace issue if the size of the XML if too big?

    Here's an example:

    declare @test-2 table (RowID INT IDENTITY PRIMARY KEY CLUSTERED, Data XML)

    insert into @test-2 (Data) values ('12')

    declare @var xml

    set @xml = '34'

    insert into @test-2 (Data) values (@xml)

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • Ok. thx. 😀 . Actually I have a doubt like, whether we can use Xquery from java for processing the XML received from Queue, not from DB. Please let me know to achive the same using Xpath . Which one is better? which API supports this from JAVA side?

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

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