-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestScript.sql
More file actions
64 lines (49 loc) · 1.34 KB
/
TestScript.sql
File metadata and controls
64 lines (49 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
USE TermProject
GO
--AddPayment
declare @PaymentID int
declare @Return int
EXEC @Return = AddPayment
12345678, --InvoiceID int
100, --PaymentAmount money
"2014-1-1", --PaymentDate datetime
"33AABBCC44", --PaymentReference nvarchar(20)
@PaymentID OUTPUT
SELECT @Return as ReturnValue,@PaymentID as PaymentID
GO
--UpdatePayment
declare @Return int
EXEC @Return = UpdatePayment
000000000, --PaymentID int
12345679, --InvoiceID int
100, --PaymentAmount money
"2014-1-1", --PaymentDate datetime
"33AABBCC44", --PaymentReference nvarchar
SELECT @Return as ReturnValue
GO
--DeletePayment
declare @Return int
EXEC @Return = DeletePayment
000000000 --PaymentID int
SELECT @RETURN as ReturnValue
GO
--GetPaymentByID
declare @Return int
declare @InvoiceID int
declare @PaymentAmount money
declare @PaymentDate datetime
declare @PaymentReference nvarchar
EXEC @Return = GetPaymentByID
000000000, --PaymentID int
@Invoice int OUTPUT
@PaymentAmount money OUTPUT
@PaymentDate datetime OUTPUT
@PaymentReference OUTPUT
SELECT @Return as ReturnValue,@InvoiceID as InvoiceID,@PaymentAmount as PaymentAmount, @PaymentDate as PaymentDate,@PaymentReference as PaymentReference
GO
--GetPaymentList
declare @Return int
EXEC @Return = GetPaymentList
0000000000, --SearchInvoiceID
2014-1-1, --SearchPaymentDate
SELECT @Return as ReturnValue