INF: Table Alias Syntax Checking in SQL 6; Now ANSI CompliantID: Q139528
|
When working with a table alias (a "correlation name" in ANSI terminology),
the syntax checking in Microsoft SQL Server 6.0 has changed to comply with
the ANSI specification. ANSI states,
A <table name> ... is exposed ... if and only if the <table reference> does not specify a <correlation name>.
As an example of the difference in behavior, assume this script has
been executed:
use pubs
go
select authors.au_lname from authors aa where au_lname like 'W%'
go
select aa.au_lname from authors aa where authors.au_lname like 'W%'
go
au_lname
----------------------------------------
White
(1 row(s) affected)
Msg 107, Level 15, State 1
The column prefix 'authors' does not match with a table name or
alias name used in the query.
select aa.au_lname from authors aa where aa.au_lname like 'W%'
Additional query words: sql6 windows nt syntax correlation alternate
Keywords : kbusage SSrvTran_SQL
Version : 6.0
Platform : WINDOWS
Issue type :
Last Reviewed: April 21, 1999