How to Insert an XML document in DB2??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • inziam
    New Member
    • Apr 2008
    • 5

    How to Insert an XML document in DB2??

    I cant able to insert an XML document in a table of XML datatype in DB2.........


    wen i try for this in control center it displays XML document is empty and

    when I try for in command editor it displays an error "An unexpected token "END-OF-STATEMENT" was found following.. Expected tokens may include: "<insert_spec>" .
    SQLSTATE=42601 "

    Pls help me .........I have tried a lot but not getting how to store XML document in DB2..........
    Kindly inofrm if u came o know.......pls. .......
  • sakumar9
    Recognized Expert New Member
    • Jan 2008
    • 127

    #2
    Originally posted by inziam
    I cant able to insert an XML document in a table of XML datatype in DB2.........


    wen i try for this in control center it displays XML document is empty and

    when I try for in command editor it displays an error "An unexpected token "END-OF-STATEMENT" was found following.. Expected tokens may include: "<insert_spec>" .
    SQLSTATE=42601 "

    Pls help me .........I have tried a lot but not getting how to store XML document in DB2..........
    Kindly inofrm if u came o know.......pls. .......

    You can refer to the sample SQLLIB/samples/xml/clp/xmlinsert.db2

    This sample demonstrates how you can insert XML documents into a table.

    Regards
    -- Sanjay

    Comment

    • inziam
      New Member
      • Apr 2008
      • 5

      #3
      Originally posted by sakumar9
      You can refer to the sample SQLLIB/samples/xml/clp/xmlinsert.db2

      This sample demonstrates how you can insert XML documents into a table.

      Regards
      -- Sanjay


      The site you have given is in different language....... ..
      So I am on the same old stage.......... ..
      Cant able to insert XML document....... ........on DB2 version 9.1
      Plsssss........ ..Help me.........Plss ss.........
      When I create an XML column type an tried to insert XML document it displays a message XML document not found.......... .

      Pls help me Sir............ ..


      Regards Inzia

      Comment

      • cburnett
        New Member
        • Aug 2007
        • 57

        #4
        Simple example:

        Code:
        create table testxml (id int not null, xmlcol xml)
        Code:
        insert into testxml values (1, '<xml>test data</xml>')

        Comment

        Working...