Does anyone know why this works:
SELECT [MyXmlColumn].query('/root') FROM [MyDatabase].[dbo].[MyTable]
But this produces an error:
SELECT [MyDatabase].[dbo].[MyTable].[MyXmlColumn].query('/root') FROM [MyDatabase].[dbo].[MyTable]
System.Data.SqlClient.SqlException: Invalid column name 'MyXmlColumn'.
This SQL is produced from a custom Expression I have written. I assume the this is just a SQL Server 2005 quirk. But base.ToQueryText() always seems to give this full qualified syntax.
Am I safe to intercept base.ToQueryText() just to give the column name or will that cause me other problems in LLB? or is there a reason for all this I am missing?