 |
» |
|
|
|
/* This file loads each of the two tables in the ManufDB database, the six tables in the PurchDB
database, and the three tables in the RecDB database with data. */
LOAD FROM EXTERNAL SUPPLYBA.SAMPLEDB.SYS TO ManufDB.SupplyBatches
VENDPARTNUMBER 1 16
BATCHSTAMP 18 23
MINPASSRATE 43 8 ?
END
N;
COMMIT WORK;
:echo Table SupplyBatches successfully loaded!;
LOAD FROM EXTERNAL TESTDATA.SAMPLEDB.SYS TO ManufDB.TestData
BATCHSTAMP 1 23
TESTDATE 25 10 ?
TESTSTART 36 8 ?
TESTEND 45 8 ?
LABTIME 54 20 ?
PASSQTY 75 2 ?
TESTQTY 78 2 ?
ENDATA
N;
COMMIT WORK;
:echo Table TestData successfully loaded!;
LOAD FROM EXTERNAL PARTS.SAMPLEDB.SYS TO PurchDB.Parts
PartNumber 1 16
PartName 17 30 ?
SalesPrice 47 12 ?
END
N;
COMMIT WORK;
:echo Table Parts successfully loaded!;
LOAD FROM EXTERNAL INVENTOR.SAMPLEDB.SYS TO PurchDB.Inventory
PartNumber 1 16
BinNumber 17 5
QtyOnHand 22 5 ?
LastCountDate 27 8 ?
CountCycle 35 5 ?
AdjustmentQty 40 5 ?
ReorderQty 45 5 ?
ReorderPoint 50 5 ?
END
N;
COMMIT WORK;
:echo Table Inventory successfully loaded!;
LOAD FROM EXTERNAL SUPPLYPR.SAMPLEDB.SYS TO PurchDB.SupplyPrice
PartNumber 1 16
VendorNumber 17 10
VendPartNumber 27 16
UnitPrice 43 12 ?
DeliveryDays 55 5 ?
DiscountQty 60 5 ?
END
N;
COMMIT WORK;
:echo Table SupplyPrice successfully loaded!;
LOAD FROM EXTERNAL ORDERS.SAMPLEDB.SYS TO PurchDB.Orders
OrderNumber 1 10
VendorNumber 11 10 ?
OrderDate 21 8 ?
END
N;
COMMIT WORK;
:echo Table Orders successfully loaded!;
LOAD FROM EXTERNAL ORDERITE.SAMPLEDB.SYS TO PurchDB.OrderItems
OrderNumber 1 10
ItemNumber 11 10
VendPartNumber 21 16 ?
PurchasePrice 37 12
OrderQty 49 5 ?
ItemDueDate 54 8 ?
ReceivedQty 62 5 ?
END
N;
COMMIT WORK;
:echo Table OrderItems successfully loaded!;
LOAD FROM EXTERNAL VENDORS.SAMPLEDB.SYS TO PurchDB.Vendors
VendorNumber 3 4
VendorName 7 30
ContactName 39 30 ?
PhoneNumber 71 12 ?
VendorStreet 88 30
VendorCity 120 20
VendorState 142 2
VendorZipCode 146 5
VendorRemarks 152 60 ?
END
N;
COMMIT WORK;
:echo Table Vendors successfully loaded!;
LOAD FROM EXTERNAL CLUBS.SAMPLEDB.SYS TO RecDB.Clubs
ClubName 1 15
ClubPhone 25 4 ?
Activity 35 18 ?
END
N;
COMMIT WORK;
:echo Table Clubs successfully loaded!;
LOAD FROM EXTERNAL MEMBERS.SAMPLEDB.SYS TO RecDB.Members
MemberName 1 20
Club 25 15
MemberPhone 45 4 ?
END
N;
COMMIT WORK;
:echo Table Members successfully loaded!;
LOAD FROM EXTERNAL EVENTS.SAMPLEDB.SYS TO RecDB.Events
SponsorClub 1 15 ?
Event 20 30 ?
Date 50 10 ?
Time 62 8 ?
Coordinator 71 20 ?
END
N;
COMMIT WORK;
:echo Table Events successfully loaded!;
INSERT INTO PURCHDB.REPORTS VALUES ('Report1', 'FREE',
'< REPORT1.SAMPLEDB.SYS>
! REPORT1');
:echo Table Reports successfully loaded;
:echo Loading of databases is now done!;
|
|