Abstract:This article describes how to migrate a local database to an SQL azure database, an error message "deprecated feature 'more than two-part column name' is not supported in this version of SQL Server. "(" the column name contains more than two components ") and its solution.
Keywords:SQL Azure, tsql, SQL Server 2008
When I migrate local data to SQL azure and execute the following script:
Create view [DBO]. [v_username]
As
Select DBO. [user]. Email from DBO. [user]
Go
Error message:
MSG 40512, level 16, state 1, procedure v_username, line 3
Deprecated feature 'more than two-part column name' is not supported in this version of SQL Server.
This error message is because the column name DBO. [user]. email in the SELECT statement consists of more than two parts. In msdn related documentation (Chinese: http://msdn.microsoft.com/zh-cn/library/ms143729.aspx, English: http://msdn.microsoft.com/en-us/library/ms143729.aspx), there is this description: in SQL Server 2008 support, however, this feature is included in the list of functions that are no longer supported in Versions later than SQL Server 2008 (which version is not yet determined). The standard format of column names in select statements is composed of two parts, column names composed of three or four parts are not supported. Through this example, we can know that this function is no longer supported in the SQL azure database.
Solution: remove the server name DBO and execute the following statement:
Create view [DBO]. [v_username]
As
Select [user]. Email from DBO. [user]
Go
【References]
1. SQL azure notes, http://www.tewari.info/2009/09/10/sql-azure-notes/, 10 Sep, 2009
1. deprecated Database Engine Features in SQL Server 2008, http://msdn.microsoft.com/en-us/library/ms143729.aspx, msdn
3. Database Engine features not recommended in SQL Server 2008, http://msdn.microsoft.com/zh-cn/library/ms143729.aspx, msdn