• Very strange the code now looks like this as you replied first time

    (SELECT Id FROM

    OPENXML(@idoc, '/Ids/Id', 2)

    WITH( Id int '.')) AS s

    ON f.FileId = s.Id

    I made some changes but undo to what you said and now seems to work

    I'm confuse can you explain please what '.' does?

    Thanks a lot