3. Examples
Example 1 has title database ZC. DBF, its database structure is: date (D, 8), title (C, 6), differential (N.6, 2). Another employee profile database ZGJK. DBF, whose database structure is: staff number (C, 6), name (C, 8), gender (C, 2), date of birth (D, 8), marriage (L, 1), title (C, 6 ), Basic salary (N, 7, 2).
According to the regulations of a printing company, employees are promoted to a level of salary every two years. Require salary adjustment, and according to whether each employee's term of service reaches two years, promotion of the corresponding job title differential wage, modify the basic salary field in the employee profile database. In order to calculate the basic salary after adjustment of employees, a new field is added to the employee profile database: promotion date (D, 8). In order to avoid repeated promotion, it should be marked whether each record has been adjusted for wages this time. An additional field must be added: Adjusted (L.1). The specific operation is as follows:
. SET DEFAULT TO C (Set current drive letter to C drive)
. Selec 1
. USE ZC (Open title library in area 1)
. LIST
RECORD# Date Title Rating
1 01/01/99 Level 5 Staff 30.00
2 01/01/99 Engineer 20.00
3 01/01/99 Senior Worker 30.00
4 01/01/99 Level 4 Staff 40.00
5 01/01/99 Intermediate 20.00
6 01/01/99 Primary Worker 14.00
. INDEX ON Title TO ZCINDEX (Preparation for Linkage)
6 RECORDS INDEX
. Selec 2
. USE ZGJK (opens the library in Zone 2)
. SET RELATION TO title INTO A (correlation logic is: B -> title = A - title)
. GO TOP
. LIST NEXT 4 Names, Basic Salaries, Job Titles, Grade A, Level Difference, Adjusted
RECORD# Name Basic salary Title A: Level difference adjusted
1 Dong Xinqiao 805.12 Intermediate 20.00 .F.
2 Li Xiaoming 904.35 Engineer 20.00 .F.
3 Zhang Lin 604.28 Junior worker 14.00.F.
4 Cheng Hong 825.60 Level 5 Staff 30.00 .F.
. Replac ALL basic salary WITH basic salary ten A> differential level FOR YEAR (A date> date)-YEAR (advanced date)>=2.AND..NOT.
10 replacements
. Replac ALL has been adjusted WITH. T. FOR YEAR (A-> date)-YEAR (promotion date)>=2
10 replacements
. GO TOP
. LIST NEXT 4 Names, Basic Salary, Title, A-> Level Difference, Adjusted
RECORD#Name Basic salary Title A->Differential adjusted
1 Dong Xinqiao 825.12 Intermediate 20.00 .T.
2 Li Xiaoming 904.35 Engineer 20.00 .F.
3 Zhang Lin 618.28 Junior worker 14.00 .T.
4 Cheng Hong 825.60 Level 5 Staff 30.00 .F.
. CLOSE DATAbase
Example 2 has a production management database SCGL whose database structure is order number (C, 10), customer name (C, 10), printing requirement (C, 55), plate making cycle (D, 8), printing cycle (D, 8 ), Post-press cycle (D, 8). The CPGL structure of the finished product management database is: order number (C, 10), customer name (C, 10), delivery method (C, 8), delivery date (D, 8), whether or not to complete (L, 1), The remaining number (N, 5). The financial management database CWGL structure is: order number (C, 10), customer name (C, 10), whether to pay the deposit
1 Calculate the customer name and total amount that have exceeded the balance period and have not settled the printing fee.
The specific operation is as follows:
. USE CWGL
. LIST Customer Name FOR DATE() > Balance Term .AND..NOT. Whether to settle
RECORD# customer name
1 Contax Insurance
4 Huazhong Laser Concord Hospital
6 Everbright Bank
8 Wuhan Plaza
10 Mathematical Communication
. SUM balance TO YOU FOR DATE> Balance period. AND. . NOT. Whether to settle
6 records summed
Balance
25982
2 Query the order numbers, customer names, printing requirements, whether settlement, clearing, instant dunning, and logically delete the settled records in all the records in the records that have exceeded the balance period and quantity.
. Selec 1
. USE SCGL
. INDEX ON order number TO AB (for database and ready for submission)
9 records indexed
. SELE 2
. USE CPGL
. INDEX ON customer name TO CD (for database and ready)
10 records indexed
. SELE 3
. USE CWGL
. SET RELATION TO order number INTO A (database parallel)
. SET RELATION TO Customer Name INTO B ADDITIVE (Database Parallel)
. Whether LIST is settled, A-> order number, B-> customer name, A-> print request FOR DATE()> balance period. AND. B-> whether or not to cross
Whether RECORD# is settled A->Order Number B->Customer Name
1 .F. 1999012101 Contax Insurance
2 .T. 1999031001 Education Press
4 .F. 1999081201 Huazhong Laser
5 .F. 1999101502 Union Hospital
7 .T. 1999032106 Golden Horse Furniture
8 .F. 1999061010 Wuhan Plaza
. LIST B->Customer Name,A->Printing Requirements FOR DATE()>Limit Period. AND. B-> whether or not to cross
B->Customer Name A->Printing Requirements
Contax Insurance
Outdoor Sofas,Outdoor Lounging Sofa,Teak Outdoor Sofas,Anti-Fouling Outdoor Sofas
INCHEE FURNITURE CO.,LTD , https://www.inchee.com