<REMOVE_BEFORE_REPLYING_dpor...@acm.org> wrote:
> Shocky wrote:
> > Am using SQL Server 2000.
>
> > I just came across the following.
>
> > Consider the below query
>
> > select distinct.tbl.Col1
> > from tab1 tbl
>
> > The above select statement works fine (Notice the dot after distinct :
> > DISTINCT.TBL.COL1)
>
> > However if i remove the table alias it does not work
>
> > select distinct.col1
> > from tab1
>
> > The above throws an error.
>
> > Does anybody have an explanation.In 2005:
>
> Msg 4104, Level 16, State 1, Line 8
> The multi-part identifier ".tbl.Col1" could not be bound.
>
> Seems like a minor bug in 2000 that it fails to detect the error.
>
> --
> David Portas, SQL Server MVP
>
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
>
> SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
> --- Hide quoted text -- Show quoted text -