Properties

Owner: dbo 
Schema bound:  
Encrypted:  
Creation Date: 08/06/2000 
Description:  

Columns

Name Data Type Length NULL IsGUID Description
  OrderID  int       
  ProductID  int       
  ProductName  nvarchar  80       
  UnitPrice  money       
  Quantity  smallint       
  Discount  real       
  ExtendedPrice  money       
Total: 7 column(s)

Objects that [dbo].[Order Details Extended] depends on

Object Name Owner Object Type Dep Level
  Categories  dbo  Table 
  Customers  dbo  Table 
  Employees  dbo  Table 
  Shippers  dbo  Table 
  Suppliers  dbo  Table 
  Orders  dbo  Table 
  Products  dbo  Table 
  Order Details  dbo  Table 
Total: 8 objects

Objects that depend on [dbo].[Order Details Extended]

Object Name Owner Object Type Dep Level
  Sales by Category  dbo  View 
Total: 1 objects

SQL

create view "Order Details Extended" AS
SELECT "Order Details".OrderID, "Order Details".ProductID, Products.ProductName,
    "Order Details".UnitPrice, "Order Details".Quantity, "Order Details".Discount,
    (CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice
FROM Products INNER JOIN "Order Details" ON Products.ProductID = "Order Details".ProductID
--ORDER BY "Order Details".OrderID

See Also

List of views