• mikael,

    Learnt something new today, thanks

    I tried with the below solution to get the value from item code

    DECLARE @XML as xml='

    <root>

    <item>1987</item>

    <item>1654</item>

    <item>1321</item>

    </root>';

    select @XML.value('/root[1]', 'nvarchar(15)') -- this is returning value as '198716541321'

    select @XML.value('/root[1]', 'int') -- this is throwing error