• You need a namespace declaration

    SET @AppName = @myDoc.value('declare default element namespace "urn:schemas-microsoft-com:asm.v1";

    (/assembly/assemblyidentity/@Appname)[1]', 'char(150)' )

    SELECT @AppName

    ____________________________________________________

    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537