forked from microsoftarchive/data-access-application-block
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Orders table so tests calling CustOrdersOrders have something to …
…work with #5
- Loading branch information
Showing
6 changed files
with
11,764 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
BVT/Data.BVT/DatabaseSetupScripts/OracleDBScripts/1.Table/Orders.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
CREATE TABLE ORDERS | ||
( | ||
ORDERID INTEGER NOT NULL, | ||
CUSTOMERID VARCHAR2 (5 BYTE) NULL, | ||
EMPLOYEEID INTEGER NULL, | ||
ORDERDATE DATE NULL, | ||
REQUIREDDATE DATE NULL, | ||
SHIPPEDDATE DATE NULL, | ||
SHIPVIA INTEGER NULL, | ||
FREIGHT NUMBER DEFAULT 0 NULL , | ||
SHIPNAME NVARCHAR2 (80) NULL, | ||
SHIPADDRESS NVARCHAR2 (120) NULL, | ||
SHIPCITY NVARCHAR2 (30) NULL, | ||
SHIPREGION NVARCHAR2 (30) NULL, | ||
SHIPPOSTALCODE NVARCHAR2 (20) NULL, | ||
SHIPCOUNTRY NVARCHAR2 (30) NULL, | ||
CONSTRAINT FK_Orders_Customers FOREIGN KEY (CUSTOMERID) REFERENCES CUSTOMERS (CUSTOMERID), | ||
CONSTRAINT FK_Orders_Employees FOREIGN KEY (EMPLOYEEID) REFERENCES EMPLOYEES (EMPLOYEEID) | ||
) | ||
TABLESPACE USERS | ||
PCTUSED 0 | ||
PCTFREE 10 | ||
INITRANS 1 | ||
MAXTRANS 255 | ||
STORAGE ( | ||
INITIAL 64K | ||
MINEXTENTS 1 | ||
MAXEXTENTS 2147483645 | ||
PCTINCREASE 0 | ||
BUFFER_POOL DEFAULT | ||
); | ||
|
||
|
||
CREATE UNIQUE INDEX PK_ORDERID ON ORDERS | ||
(ORDERID) | ||
TABLESPACE USERS | ||
PCTFREE 10 | ||
INITRANS 2 | ||
MAXTRANS 255 | ||
STORAGE ( | ||
INITIAL 64K | ||
MINEXTENTS 1 | ||
MAXEXTENTS 2147483645 | ||
PCTINCREASE 0 | ||
BUFFER_POOL DEFAULT | ||
); | ||
|
||
|
||
ALTER TABLE ORDERS ADD ( | ||
CONSTRAINT PK_ORDERID | ||
PRIMARY KEY | ||
(ORDERID) | ||
USING INDEX | ||
TABLESPACE USERS | ||
PCTFREE 10 | ||
INITRANS 2 | ||
MAXTRANS 255 | ||
STORAGE ( | ||
INITIAL 64K | ||
MINEXTENTS 1 | ||
MAXEXTENTS 2147483645 | ||
PCTINCREASE 0 | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
BVT/Data.BVT/DatabaseSetupScripts/OracleDBScripts/3.SP/CustOrdersOrders.prc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE OR REPLACE PROCEDURE "CustOrdersOrders"(VCUSTOMERID IN Orders.OrderID%TYPE := 1, CUR_OUT OUT PKGENTLIB_ARCHITECTURE.CURENTLIB_ARCHITECTURE) | ||
AS | ||
|
||
BEGIN | ||
OPEN cur_OUT FOR | ||
SELECT * | ||
FROM Orders | ||
WHERE customerID = vCustomerId; | ||
END; | ||
/ |
Oops, something went wrong.