SQL 2000 bug: When you modify an existing view in the Enterprise Manager, the column name is automatically changed to expr1, expr2, and so on.

Source: Internet
Author: User

This problem has been encountered before, and it seems to be solved after I reinstall SQL. Today I encountered the same problem. When I modified an existing view of SQL 2000, once the previous good view is modified with the Enterprise Manager, all the column names listed in the SELECT statement are automatically changed to expr1, expr2, and so on. It is useless to patch to SP4.

Select DBO. paper. *, DBO. prj. prjname as expr1, DBO. prj. prjtype as expr2, <br/> DBO. users. username as expr3, DBO. users. fullname as expr4, DBO. rsda. sn AS expr5 <br/> from DBO. paper left Outer Join <br/> DBO. papertype on DBO. paper. invalid ype = DBO. papertype. sys left Outer Join <br/> DBO. rsda on DBO. paper. PID = DBO. rsda. PID left Outer Join <br/> DBO. users on DBO. paper. userid = DBO. users. userid left Outer Join <br/> DBO. prj on DBO. paper. prjid = DBO. prj. prjid

Today, I checked it online to find out the Microsoft Bug, which exists in both SQL 7 and SQL 2000.

 

Symptoms:

When you design a View tool from the SQL Server Enterprise Manager (SEM) to create a view, the T-SQL syntax displays normally. However, if the view is saved, close the design view and re-open the design view to check the view. Then, the syntax may be changed.

This problem occurs in SQL Server 2000 and SQL Server 7.0, although the change to T-SQL is slightly different between two versions. This action only has a small and unique group. For more information, see "More information.

Right-click the view and selectAttributeThe view syntax is displayed normally. It can run in the query analyzer (QA) and returns the correct results each time. However, the modified syntax does not return the correct results from the design view.

 

Cause:

This issue is already associated with an external connection, rather than because it should not occur in these specific circumstances when it comes to autoaliasing. In the result, an unbound column is created to obtain and re-bind to the error table.

 

Alternative method:

After creating a view using the design view, do not edit it. Then resaving uses the design View tool in the SQL Enterprise Manager view. Encoded using the query analyzer and T-SQL.

 

Microsoft has confirmed that this is a problem in SQL Server 7.0.
Microsoft has confirmed that this is an issue in SQL Server 2000.

.....

 

These are the results of Machine Translation. Let's take a look at the original micorosft link.

 

 

View the original Microsoft text:

English of http://support.microsoft.com/kb/288527/zh-cn Machine Translation

Http://support.microsoft.com/kb/288527/en-us/

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.