Operand type clash: xml is incompatible with text

hi to all .thank in advance  ..i am using sql server .i want insert below xml into one column in table which is xml data type 
but i am getting error Operand type clash: xml is incompatible with text .pls tell me solution for this ?
mailto:[email protected]mailto:[email protected]541481b182404a3ea819f0aba886e6522010-08-23T18:27:28.2Z
163U067PL4E5LYK0D1EGXTA57JUW5HCFQ4B9900007TW1FKB1P1H2P468L3L7RM812GR7X5O70VQ35602NPPQGU765FX7262US8X6G18NMG67H47DruglixPharmacist last name goes here nowwPharmacist First name goes in herePharmacist Middle name goes hereJunior iiiPharmacistPharmacist agent Last name goes inPharmacist agent First name goes inPharmacist agent Middle name goesinJunior iiiPharmacist
333 SR 566Ste 200MinneapolisMN55401
[email protected]pharmacyphar.com4015633390TE4016668888FX7039212122x2342BN7039212123x2343HP7039212124x2344HP7039212125x2345NP7039212126x2346CP7039212127x2347TE
6033168728001A70L70O1T16IB6P2AQ38MS0B2LVM1K11S1NQWM866L361U6P775P5W2TX1IE0XJ8PP8DCOThe prescribers Clinic for patientsJames Max bond James Max bondMat Hardy Mat Hardy Mat HardyMathews Mathews Mathews MathewsJunior iiiPrescriberAMOCCPrescriber agent Last name goes nowPrescriber agent First name goes inPrescriber agent middle name goesinJunior iiiNurse12345
main street washingtonAPT 205WashingtonAK46466
[email protected]scriber.com9856467876X4545TE4697879745FX7145652586X2563WP7146562563CP7031234564x55554TE7031234565x55555BN7031234566x55556TE7031234567x55557BN
6033168728001R52FQB6KAJL7320BX8E3D308G4K7MDD8TO7KK416IH02WE6543QW0O343Y1PU87240UJ7QThis is the supervisors clinic 1234Supervisor Last name goes in hereIISupervisor First Name Goes here nowSupervisor Middle Name goes in hereSuffix 123SupervisorAMOTRSupervisor agent Last name goeshereSupervisor agent First name goes inSupervisor agent middle name goesinJunior iiiSupervisor
Supervisor address line 1 goes hereSupervisor address line 2 goes hereSupervisor city name goes inthis plVA803695432
[email protected]mailemailema.com01141222123456789x1234567HP7032224441x1231NP7032224442x1232BN7032224443x1233CP7032224444x1234CP7032224445x1235NP7032224446x1236CP7032224447x1237HP
U801OQG2PQ7X3L3QO6VQDHT328E15W17DS4OT486OY8YO6P7GY0L84N1676L05RMA7P8CCPt Last name is Deerfield BrylawskyFirst name is John from AlexandriaaMiddle name is Jack from AlexandriaJunior iiiPatient IIF19840101
Patient address line 1 goes in herePatient address line 2 goes in herePatient city name goes inthis placeCO803615977
[email protected]lemailemaile.com57192121221234567890x4444NP7034445522x4472HP7034445523x4473NP7034445524x4474NP7034445525x4475BN7034445526x4476NP7034445527x4477HP7034445528x4478FX
Amoxicillin-Pot Clavulanate 200 mg-28.5 mg Chewable Tablet (AMOXICILLIN TRIHYDRATE/POTASSIUM CLAVULANATE)00093227034NDU255.012345678910999Please take one chewable tablet every day in the morning during breakfast with plenty of milk. Take one tablet at night before going to bed.THIS IS A TEST MESSAGE PLEASE DISREGARD, THIS IS A TEST MESSAGE PLEASE DISREGARD. THIS IS A TEST MESSAGE PLEASE DISREGARD. THIS IS A TEST MESSAGE PLEASE DISREGARD. TESTING MAX LENGTH OF CHARACTERS IN THE NOTESR9902010010120100525PrescriberSuppliedICD-9303EV41V31Q52WU6SICD-9456HC48O73A13HS8YPrescriberSuppliedICD-9146DO81O08M03FL0RICD-9688JL30F24W70IH2BG1S1IIN888TFV62FK6P2CGT4R7CCCM6083DF0

 

I don’t see any issues in your xml  file and it should upload correctlySnippetdeclare @tab as table(ID integer, filedesc xml);insert into @tab values(1,’

mailto:[email protected]‘+’mailto:[email protected]541481b182404a3ea819f0aba886e6522010-08-23T18:27:28.2Z
163U067PL4E5LYK0D1EGXTA57JUW5HCFQ4B9900007TW1FKB1P1H2P468L3L7RM812GR7X5O70VQ35602NPPQGU765FX7262US8X6G18NMG67H47DruglixPharmacist last name goes here nowwPharmacist First  name goes in herePharmacist Middle name goes hereJunior iiiPharmacistPharmacist agent Last name goes  inPharmacist agent First name goes inPharmacist agent Middle name goesinJunior iiiPharmacist
333 SR 566Ste 200MinneapolisMN55401
[email protected]pharmacyphar.com4015633390TE4016668888FX7039212122×2342BN7039212123×2343HP7039212124×2344HP7039212125×2345NP7039212126×2346CP7039212127×2347TE
6033168728001A70L70O1T16IB6P2AQ38MS0B2LVM1K11S1NQWM866L361U6P775P5W2TX1IE0XJ8PP8DCOThe prescribers Clinic for patientsJames Max bond James Max bondMat Hardy Mat Hardy Mat HardyMathews Mathews Mathews MathewsJunior iiiPrescriberAMOCCPrescriber agent Last name goes nowPrescriber agent First name goes inPrescriber agent middle name goesinJunior iiiNurse12345
main street washingtonAPT 205WashingtonAK46466
[email protected]scriber.com9856467876X4545TE4697879745FX7145652586X2563WP7146562563CP7031234564×55554TE7031234565×55555BN7031234566×55556TE7031234567×55557BN
6033168728001R52FQB6KAJL7320BX8E3D308G4K7MDD8TO7KK416IH02WE6543QW0O343Y1PU87240UJ7QThis is the supervisors clinic 1234Supervisor Last name goes in hereIISupervisor First Name Goes here nowSupervisor Middle Name goes in hereSuffix 123SupervisorAMOTRSupervisor agent Last name goeshereSupervisor agent First name goes inSupervisor agent middle name goesinJunior iiiSupervisor
Supervisor address line 1 goes hereSupervisor address line 2 goes hereSupervisor city name goes inthis plVA803695432
[email protected]mailemailema.com01141222123456789×1234567HP7032224441×1231NP7032224442×1232BN7032224443×1233CP7032224444×1234CP7032224445×1235NP7032224446×1236CP7032224447×1237HP
U801OQG2PQ7X3L3QO6VQDHT328E15W17DS4OT486OY8YO6P7GY0L84N1676L05RMA7P8CCPt Last name is Deerfield BrylawskyFirst name is John from AlexandriaaMiddle name is Jack from AlexandriaJunior iiiPatient IIF19840101
Patient address line 1 goes in herePatient address line 2 goes in herePatient city name goes inthis placeCO803615977
[email protected]lemailemaile.com57192121221234567890×4444NP7034445522×4472HP7034445523×4473NP7034445524×4474NP7034445525×4475BN7034445526×4476NP7034445527×4477HP7034445528×4478FX
Amoxicillin-Pot Clavulanate 200 mg-28.5 mg Chewable Tablet (AMOXICILLIN TRIHYDRATE/POTASSIUM CLAVULANATE)00093227034NDU255.012345678910999Please take one chewable tablet every day in the morning during breakfast with plenty of milk. Take one tablet at night before going to bed.THIS IS A TEST MESSAGE PLEASE DISREGARD, THIS IS A TEST MESSAGE PLEASE DISREGARD. THIS IS A TEST MESSAGE PLEASE DISREGARD. THIS IS A TEST MESSAGE PLEASE DISREGARD.  TESTING MAX LENGTH OF CHARACTERS IN THE NOTESR9902010010120100525PrescriberSuppliedICD-9303EV41V31Q52WU6SICD-9456HC48O73A13HS8YPrescriberSuppliedICD-9146DO81O08M03FL0RICD-9688JL30F24W70IH2BG1S1IIN888TFV62FK6P2CGT4R7CCCM6083DF0
‘)select 

You can really do waht sansan says, but also try this instead if failing:  ALFKI307/3/200407/4/200415/3/2004            CREATE PROCEDURE xmlOrderInsert @order ntext ASDECLARE @docHandle int, @OID intEXEC sp_xml_preparedocument @docHandle OUTPUT, @orderBEGIN TRANSACTIONINSERTINTO Orders( CustomerID, EmployeeID, OrderDate, RequiredDate )   SELECT CustomerID, EmployeeID, OrderDate, RequiredDate   FROM Openxml( @docHandle, ‘/Order’, 3) WITH ( CustomerID nchar(5),   EmployeeID int,   OrderDate datetime, RequiredDate datetime   )IF @@ERROR<>0 BEGIN ROLLBACK TRANSACTION RETURN -100 ENDSET @OID = SCOPE_IDENTITY()INSERTINTO [Order Details] ( OrderID, ProductID, UnitPrice, Quantity, Discount ) SELECT @OID AS [PO ID], ProductID, UnitPrice, Quantity, Discount FROM OpenXml( @docHandle, ‘/Order/OrderDetails’, 1)   WITH  ( ProductID int, UnitPrice money, Quantity smallint, Discount real   )   IF @@ERROR<>0 BEGIN ROLLBACK TRANSACTION RETURN -101 ENDCOMMIT TRANSACTIONEXEC sp_xml_removedocument @docHandle SELECT @OID AS [Order ID]GOusing System;using System.Xml.Serialization;namespace XMLInsert  {         public class Order       {            public Order()            {                   OrderDetails=null;  //new OrderDetail[0];              }           private string CID=””;            private int EID;            private string ODate;            private string RDate;            private string SDate;            [XmlElement(“OrderDetails”)]            public OrderDetail[] OrderDetails;           public string CustomerID            {                 get                 {                      return this.CID;                 }                 set                 {                      CID=value;                 }            }            public int EmployeeID           {                   get                   {                      return this.EID;                 }                 set                 {                      EID=value;                 }            }            public string OrderDate            {                   get                 {                      return this.ODate;                 }                 set                 {                      ODate=value;                 }            }            public string RequiredDate            {                 get                 {                      return this.RDate;                 }                 set                 {                      RDate=value;                 }              }             public string ShippedDate              {                   get                 {                      return this.SDate;                 }                 set                 {                      SDate=value;                 }              }       }  } The above class represents parent Order table  in Northwind database. The class has a property OrderDetails which is an array of the class OrderDetail which we will later define. [XmlElement(“OrderDetails”)] will enable each item of the array to be transformed into element when we perform object serialization. Collapse | Copy Codeusing System;