title: XML from SQL column: Cannot call methods on nvarchar(max)
body: <p>I have a sql query that is kicking back with an error on my column name saying 'cannot call methods on nvarchar(max).</p>
  
  <pre><code>      SELECT [LEARNER_COURSE_XML_TEST].[XML_EX].Query('declare namespace
        x="http://tempuri.org/cmi.xsd";] (/x:cmi/x:core/x:time_taken)') 
        AS TimeTaken FROM [LEARNER_COURSE_XML_TEST]
  </code></pre>
  
  <p>The issue seems to centre around [XML_EX].value but I've tried a few things including changing the column type but i've finally come unstuck.  Any pointers would be greatly appreciated.</p>