Wrox Programmer Forums
|
BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 Discuss the book Beginning Microsoft SQL Server 2008 Programming, Robert Vieira, ISBN: 978-0-470-25701-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 17th, 2009, 04:42 PM
Registered User
 
Join Date: Mar 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question 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...






Similar Threads
Thread Thread Starter Forum Replies Last Post
date formate in alias mateenmohd SQL Server 2000 1 November 7th, 2004 02:58 AM
Access alias question badgolfer Access 2 December 15th, 2003 04:47 AM
Access alias question badgolfer VB Databases Basics 1 December 12th, 2003 11:56 PM
The Alias Problem byterbit SQL Language 3 July 3rd, 2003 07:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.