none
Xml source in SSIS

    Question

  • I am trying to import data from an xml file named book.xml to tables in SSMS.

    This is my xml file:

    <?xml version="1.0"?>
    <bookstore speciality="novel">
       <book style ="autobiography">
         <author>
     <first-name>Joe</first-name>
            <last-name>Bob</last-name>
     <award>Trenton literary</award>
         </author>
       </book>
       <book style="textbook">
         <author>
     <first-name>Mary</first-name>
     <last-name>Bob</last-name>
            <publication>
              <first-name>Trinda</first-name>
              <last-name>Bob</last-name>
            </publication>
         </author>
         <editor>
     <first-name>Britney</first-name>
            <last-name>Bob</last-name>
         </editor>
         <price>18</price>
       </book>
    </bookstore>
     
    I have these tables in my SSMS :
    1. Books
    2.Author
    3.editor
    4.publication

    when i passed the output of xml source to my OLE DB destination am getting this error message
    error message:column "style" cannot convert between unicode and non unicode string data type.

    The datatype which i have defined for "style" column is varchar(50).
    How do i solve this issue? Do i need to use an data conversion transformation?? am a begineer in ssis. please help

     

    Monday, July 11, 2011 6:19 PM

Answers

All replies