I am using the following code It is not returning me results. What am i missing here?
declare @iDoc INT
EXEC sp_xml_preparedocument @iDoc OUTPUT, '<Ids><Id Val ="40041">11</Id><Id Val ="40042">22</Id></Ids>'
Select @iDoc
Select Val FROM OPENXML (@iDoc, '/Ids/Id',2) WITH (Val varchar(10))