~halega/+junk/sqlinstaller

« back to all changes in this revision

Viewing changes to SQLInstaller.Sample/Scripts/SqlServer/Install/StoredProcedures/OrderDetailsInsert.StoredProcedure.sql

  • Committer: sk
  • Date: 2011-09-10 05:32:36 UTC
  • Revision ID: halega@halega.com-20110910053236-1877r3p0k4a64bgx
Tags: 1.2.2
1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
CREATE PROCEDURE OrderDetailsInsert
 
3
(
 
4
        @OrderID decimal(10,0),
 
5
        @ProductID decimal(10,0),
 
6
        @UnitPrice money,
 
7
        @Quantity decimal(5,0),
 
8
        @Discount real,
 
9
        @AuthUserID nvarchar(255)
 
10
)
 
11
AS
 
12
BEGIN
 
13
 
 
14
        SET NOCOUNT OFF
 
15
        EXEC SetUserContext @AuthUserID
 
16
        DECLARE @Err int
 
17
 
 
18
        INSERT
 
19
        INTO OrderDetails
 
20
        (
 
21
                OrderID,
 
22
                ProductID,
 
23
                UnitPrice,
 
24
                Quantity,
 
25
                Discount
 
26
        )
 
27
        VALUES
 
28
        (
 
29
                @OrderID,
 
30
                @ProductID,
 
31
                @UnitPrice,
 
32
                @Quantity,
 
33
                @Discount
 
34
        )
 
35
 
 
36
        SET @Err = @@Error
 
37
 
 
38
 
 
39
        RETURN @Err
 
40
END
 
41
GO
 
42