Incorrect syntax: EXECUTE AS User = dbo.fnc_GetUser()
Hi all,
We have a stored procedure containing following code: EXECUTE AS User = dbo.fnc_GetUser(). Studio does not correctly recognize it and gives us warning of "TSD2010: Incorrect syntax near dbo.". Any idea how to correct this?
Thanks, Pavel
This is a problem in our T-SQL parser, the grammar does not recognize this is valid syntax. I was not even aware this was allowed syntax and the SQL Books Online is not either. Not that this is an excuse, apparently it works and is not documented as such, since the documentation suggests literal input only.
We will get this fixed for the Orcas release of VSDBPro.
-GertD
http://blogs.msdn.com/gertd