FIX: Correlated Subquery Can Fail With Trace Flag 204 Enabled (158235)
The information in this article applies to:
This article was previously published under Q158235
BUG #: 15927 (Windows NT: 6.5)
SYMPTOMS
Microsoft SQL Server version 6.5 does not allow a correlated subquery in
the column list of a SELECT statement when trace flag 204 is enabled. When
this type of query is executed, the following error is encountered:
Msg 107, Level 15, State 1
The column prefix 'o' does not match with a table name or alias name
used in the query.
This type of query is used by SQL Enterprise Manager (actually SQL
Distributed Management Objects, or SQL-DMO) to obtain details about
databases. Therefore, certain operations in SQL Enterprise Manager, such as
viewing a list of databases in the database tree, will not appear to work,
and no error message is provided.
WORKAROUND
To work around this problem, disable trace flag 204, and create a stored
procedure that contains your query. This stored procedure can be run with
trace flag 204 enabled, and it will produce the correct results. For SQL
Enterprise Manager, you must disable this trace flag to use all features of
the product.
STATUS
Microsoft has confirmed this to be a problem in Microsoft SQL Server
version 6.5. This problem has been corrected in U.S. Service Pack 2 for
Microsoft SQL Server version 6.5. For more information, contact your
primary support provider.
Modification Type: | Major | Last Reviewed: | 10/3/2003 |
---|
Keywords: | kbBug kbfix kbnetwork KB158235 |
---|
|