Insert values intoxml document in sqlserver2005

  • I want to insert the value of a variable into my xml fragment. but it gives me the error:

    "Operand type clash: int is incompatible with xml"

    Heres my code:

    declare @i int

    declare @teste xml

    declare @teste1 xml

    set @i=23

    set @teste=('

    ')

    set @teste1=('

    ')

  • I must be missing something. All your code does is create some variables and assign some basic values to them. I tried it in Management Studio and it runs.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

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