INF: Effective Use of Trace Flag 204 for ANSI Non-standard Ext |
Q136967
Microsoft SQL Server version 6.0 provides a trace flag 204 for portability of version 4.2x SQL scripts. This trace flag is intended to aid customers in the short term as they modify transact-SQL code to be more ANSI compliant.
SQL Server version 4.2x facilitates the following as non-ANSI extensions:
use pubs
go
select pub_id, pub_name, count(pub_id)
from publishers
group by pub_name
go
The above non-ANSI query is not permitted in version 6.0 because
the SELECT list has certain entries that are non-aggregates and are not
present in the GROUP BY list. Trace flag 204 will allow the above query
to run as it did in SQL Server 4.2x.
use pubs
go
drop table table1
go
create table table1( col1 text )
go
insert into table1 values ("John ")
go
insert into table1 values ("John")
go
select * from table1 where col1 like 'John %'
/* Note the blank space in the literal above*/
go Additional query words: sql6
Keywords : kbusage
Issue type :
Technology : kbSQLServSearch kbAudDeveloper kbSQLServ600
|
Last Reviewed: December 16, 1999 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |