Owner: | dbo |
Encrypted: | |
Creation Date: | 08/06/2000 |
Description: |
QUOTED_IDENTIFIER: | |
ANSI_NULLS: |
Name | Direction | DataType | Length | |
|
@OrderID | INPUT | int | 4 |
Objects that [dbo].[CustOrdersDetail] depends on
Object Name | Owner | Object Type | Dep Level | |
|
Categories | dbo | Table | 1 |
|
Customers | dbo | Table | 1 |
|
Employees | dbo | Table | 1 |
|
Shippers | dbo | Table | 1 |
|
Suppliers | dbo | Table | 1 |
|
Orders | dbo | Table | 2 |
|
Products | dbo | Table | 2 |
|
Order Details | dbo | Table | 3 |
User/Role | Select | Insert | Delete | Update | Execute | DRI | |
|
public | GRANT |
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE CustOrdersDetail @OrderID int
AS
SELECT ProductName,
UnitPrice=ROUND(Od.UnitPrice, 2),
Quantity,
Discount=CONVERT(int, Discount * 100),
ExtendedPrice=ROUND(CONVERT(money, Quantity * (1 - Discount) * Od.UnitPrice), 2)
FROM Products P, [Order Details] Od
WHERE Od.ProductID = P.ProductID and Od.OrderID = @OrderID
GO
SET QUOTED_IDENTIFIER OFF
GO
GO
SET ANSI_NULLS OFF
GO
See Also
List of stored procedures