A Preliminary Study on SQL azure-error cause and solution of "more than two parts of column name"

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.