Another day at work:
Let's say your boss wants to see orders with a line total less than $5. He is planning on writing up the Sales people who have made such orders. He just wants the line total.
Hint: The table used is sales.salesorderdetail.
In a New Query type:
USE AdventureWorks
Select SalesOrderID, LineTotal
FROM Sales.SalesOrderDetail
WHERE LineTotal
Order by LineTotal
Execute and you will see two columns the SalesOrderID and the LineTotal. The Line Total will be ordered (sorted) least to greatest because of the "Order by" command.
If you want to know more about views see The Code Project article about Views.
State of the Union Afterthought
13 years ago
No comments:
Post a Comment