I plan to upgrade to SQL Server 2008 from 2000. I’ve read that to run in 2008 mode, you must not use an alias (for a column name) in the Order By or Group By clauses. The use of *= and =* for joins is also verboten along with the keyword “WITH” (except in nolocks).
Hmm, does that mean:
Select a, b, c, 1 as AnAlias, d from aTable
UNION
Select e, f, g, 2, h from anotherTable order by AnAlias
will not work?
Are there any other gotchas in 2008 TSQL?
Karl
[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
Hmm, does that mean:
Select a, b, c, 1 as AnAlias, d from aTable
UNION
Select e, f, g, 2, h from anotherTable order by AnAlias
will not work?
Are there any other gotchas in 2008 TSQL?
Karl
[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]