Alias all-or-nothing
i couldn't figure out why i kept getting the 'multi-part identifier' error until i read page 87 where it says 'using an alias is an all-or-nothing proposition. Once you decide to alias a table, you must use that alias in every part of the query'.
so i started using the alias everywhere in the query and i quit getting that error.
but.. why does this query work?
select pp.FirstName, LastName
from Person.Person pp
orderby LastName
i'm not being consistent with the 'pp' alias.. so i must not understand fully the rule on when an alias is 'required'...
can this be explained a little further?
thanks...
|