Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Continuation of Message #1594531 - Use of WHERE
Message
From
22/02/2014 22:36:04
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01594922
Message ID:
01594971
Views:
40
>There is one important problem in this code sample - the OrderDate is not prefixed with the alias. Without that we would need to check which table this column belongs to.
>My rule of thumb - prefix every column with an alias name when the query involves more than 1 table.

I don't disagree with the rule of thumb, especially with several tables. But with 2 tables (a business entity master and a child table of orders), any question about the lineage of OrderDate is more likely a problem with the person in the chair. :)

>
>And of course I wrote about the LEFT JOIN problem several years ago in the following blog post
>

"Of course" ??
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform