プロジェクト

全般

プロフィール

統計
| リビジョン:

h-you / branches / ddl / create_table_mysql.sql @ 72

履歴 | 表示 | アノテート | ダウンロード (31.7 KB)

1 27 bit
CREATE TABLE ACTIONSCHEDULEDATA
2
(        TARGETDATE DATE NOT NULL,
3
        PERSONCODE NUMERIC(8,0) NOT NULL,
4
        ACTIONSCHEDULE VARCHAR(30),
5
        TARGETYEAR NUMERIC(4,0) NOT NULL,
6
        TARGETMONTH NUMERIC(2,0) NOT NULL,
7
        TARGETDAY NUMERIC(2,0) NOT NULL,
8
        ENTRYDATE DATETIME NOT NULL,
9
        UPDATEDATE DATETIME NOT NULL,
10
         PRIMARY KEY(TARGETDATE, PERSONCODE)
11
);
12
13
CREATE TABLE APPROVALMASTER
14
(        APPROVALCODE NUMERIC(3,0) NOT NULL,
15
        DEPARTMENTCODE NUMERIC(5,0) NOT NULL,
16
        SEQNO NUMERIC(2,0) NOT NULL,
17
        DISPLAYORDER NUMERIC(2,0) NOT NULL,
18
        APPROVALPERSON NUMERIC(8,0) NOT NULL,
19
        APPROVALAUTHORITY NUMERIC(1,0) NOT NULL,
20
        ENTRYDATE DATETIME,
21
        UPDATEDATE DATETIME,
22
         PRIMARY KEY (APPROVALCODE, DEPARTMENTCODE, SEQNO)
23
);
24
25
CREATE TABLE BUSINESSTYPEMASTER
26
(        BUSINESSTYPECODE NUMERIC(5,0) NOT NULL,
27
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
28
        BUSINESSTYPENAME VARCHAR(100) DEFAULT '' NOT NULL,
29
        ENTRYDATE DATETIME NOT NULL,
30
        UPDATEDATE DATETIME NOT NULL,
31
         PRIMARY KEY (BUSINESSTYPECODE)
32
);
33
34
CREATE TABLE COMMONCOSTLARGE
35
(        LARGECODE NUMERIC(5,0) NOT NULL,
36
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
37
        LARGENAME VARCHAR(50) DEFAULT '' NOT NULL,
38
        COMMENTTEXT VARCHAR(120),
39
        DELETEFLG NUMERIC(1,0) NOT NULL,
40
        ENTRYDATE DATETIME NOT NULL,
41
        UPDATEDATE DATETIME NOT NULL,
42
         PRIMARY KEY (LARGECODE)
43
);
44
45
CREATE TABLE COMMONCOSTLINKMS
46
(        LARGECODE NUMERIC(5,0) NOT NULL,
47
        MIDDLECODE NUMERIC(5,0) NOT NULL,
48
        ITEMCODE NUMERIC(5,0) NOT NULL,
49
        ENTRYDATE DATETIME,
50
        UPDATEDATE DATETIME,
51
         PRIMARY KEY (LARGECODE, MIDDLECODE, ITEMCODE)
52
);
53
54
CREATE TABLE COMMONCOSTMIDDLE
55
(        LARGECODE NUMERIC(5,0) NOT NULL,
56
        MIDDLECODE NUMERIC(5,0) NOT NULL,
57
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
58
        MIDDLENAME VARCHAR(50) DEFAULT '' NOT NULL,
59
        COMMENTTEXT VARCHAR(120),
60
        DELETEFLG NUMERIC(1,0) NOT NULL,
61
        ENTRYDATE DATETIME NOT NULL,
62
        UPDATEDATE DATETIME NOT NULL,
63
         PRIMARY KEY (LARGECODE, MIDDLECODE)
64
);
65
66
CREATE TABLE COMMONCOSTMIDDLESEARCHWORD
67
(        LARGECODE NUMERIC(5,0) NOT NULL,
68
        MIDDLECODE NUMERIC(5,0) NOT NULL,
69
        SEQNO NUMERIC(5,0) NOT NULL,
70
        SEARCHWORD VARCHAR(50) DEFAULT '' NOT NULL,
71
        ENTRYDATE DATETIME NOT NULL,
72
        UPDATEDATE DATETIME NOT NULL,
73
         PRIMARY KEY (LARGECODE, MIDDLECODE, SEQNO)
74
);
75
76
CREATE TABLE COMPONENTLINKMASTER
77
(        COMPONENTCODE NUMERIC(5,0) NOT NULL,
78
        ITEMCODE NUMERIC(5,0) NOT NULL,
79
        DISPLAYORDER NUMERIC(5,0),
80
        ENTRYDATE DATETIME NOT NULL,
81
        UPDATEDATE DATETIME NOT NULL,
82
         PRIMARY KEY (COMPONENTCODE, ITEMCODE)
83
);
84
85
CREATE TABLE COMPONENTMASTER
86
(        COMPONENTCODE NUMERIC(5,0) NOT NULL,
87
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
88
        COMPONENTNAME VARCHAR(120) DEFAULT '' NOT NULL,
89
        SUBITEMSFLG NUMERIC(1,0),
90
        DIRECTINPUTFLG NUMERIC(1,0),
91
        MYEXPENSESFLG NUMERIC(1,0),
92
        DELETEFLG NUMERIC(1,0) NOT NULL,
93
        ENTRYDATE DATETIME NOT NULL,
94
        UPDATEDATE DATETIME NOT NULL,
95
         PRIMARY KEY (COMPONENTCODE)
96
);
97
98
CREATE TABLE CONSTRUCTIONBASEINFO
99
(        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
100
        TYINGFLG NUMERIC(1,0) NOT NULL,
101
        CONSTRUCTIONYEAR NUMERIC(4,0) NOT NULL,
102
        CONSTRUCTIONPERIOD NUMERIC(4,0) NOT NULL,
103
        REQUESTEDDATE DATE,
104
        ESTIMATESSUBMITDEADLINE DATE,
105
        ESTIMATESSUBMITTEDDATE DATE,
106
        PROVISIONALORDERDATE DATE,
107
        ORDERDATE DATE,
108
        ORDERSTARTINGDATE DATE,
109
        ORDERCOMPLETIONDATE DATE,
110
        PREPARATIONSTARTDATE DATE,
111
        CONSTRUCTIONSTARTINGDATE DATE,
112
        CONSTRUCTIONCOMPLETIONDATE DATE,
113
        NONORDERDATE DATE,
114
        ORDERSDECISIONPRICE NUMERIC(12,2) NOT NULL,
115
        ORDERSDECISIONPRICEINTAX NUMERIC(12,2) NOT NULL,
116
        SALESPERSONCODE NUMERIC(8,0),
117
        CONSTRUCTIONPERSONCODE NUMERIC(8,0) NOT NULL,
118
        CONSTRSUBPERSONCODE NUMERIC(8,0) NOT NULL,
119
        CONSTRUCTIONINSTRUCTOR NUMERIC(8,0) NOT NULL,
120
        TRANSFERCONSTRUCTION NUMERIC(8,0) NOT NULL,
121
        TRANSFERCONSTRUCTIONDATE DATE,
122
        ORDERERSDIVISION NUMERIC(5,0) NOT NULL,
123
        ORDERERSCODE NUMERIC(5,0) NOT NULL,
124
        ESTIMATESEXPIRATIONDATE DATE,
125
        CONSTRUCTIONPERIODSTART DATE,
126
        CONSTRUCTIONPERIODEND DATE,
127
        CONSTRUCTIONPERIODSTART2 DATE,
128
        CONSTRUCTIONPERIODEND2 DATE,
129
        STARTDATE DATE,
130
        ENDDATE DATE,
131
        PURCHASEORDERMAILINGDATE DATE,
132
        PURCHASEORDERRETURNDATE DATE,
133
        PURCHASEORDERRETURNCHECKDATE DATE,
134
        CONSUMPTIONTAXFLG NUMERIC(1,0) NOT NULL,
135
        PRIMECONTRACTORFLG NUMERIC(1,0) NOT NULL,
136
        SALESCOSTFLG NUMERIC(1,0) NOT NULL,
137
        CONSTRUCTIONSTATUSFLG NUMERIC(2,0) NOT NULL,
138
        CONSTRUCTIONTYPE NUMERIC(5,0) NOT NULL,
139
        ESTIMATETYPE NUMERIC(1,0) NOT NULL,
140
        BILLINGSTARTDATE DATE NOT NULL,
141
        BILLINGDATE DATE NOT NULL,
142
        BILLINGSPLITFLG NUMERIC(1,0) NOT NULL,
143
        BILLINGSENDDATE DATE,
144
        LEDGERCOMPLATEDATE DATE NOT NULL,
145
        ENTRYDATE DATETIME NOT NULL,
146
        UPDATEDATE DATETIME NOT NULL,
147
         PRIMARY KEY (CONSTRUCTIONCODE)
148
);
149
150
CREATE TABLE CONSTRUCTIONBASEINFODETAIL
151
(        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
152
        DETAILNO NUMERIC(2,0) NOT NULL,
153
        DETAILSTRING VARCHAR(120),
154
        ENTRYDATE DATETIME NOT NULL,
155
        UPDATEDATE DATETIME NOT NULL,
156
         PRIMARY KEY (CONSTRUCTIONCODE, DETAILNO)
157
);
158
159
CREATE TABLE CONSTRUCTIONBUDGET
160
(        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
161
        CREATORCODE NUMERIC(8,0) NOT NULL,
162
        CREATORNAME VARCHAR(60),
163
        CREATORCOSTS NUMERIC(11,3) NOT NULL,
164
        ASSISTANTCODE NUMERIC(8,0) NOT NULL,
165
        ASSISTANTNAME VARCHAR(60),
166
        ASSISTANTCOSTS NUMERIC(11,3) NOT NULL,
167
        INSTRUCTORCODE NUMERIC(8,0) NOT NULL,
168
        INSTRUCTORNAME VARCHAR(60),
169
        INSTRUCTORCOSTS NUMERIC(11,3) NOT NULL,
170
        CREATEDATE DATE NOT NULL,
171
        CONSTRUCTIONTIMES NUMERIC(5,2) NOT NULL,
172
        CONSTRUCTIONSTART DATE NOT NULL,
173
        CONSTRUCTIONEND DATE NOT NULL,
174
        INSTRUCTORTIMES NUMERIC(5,2) NOT NULL,
175
        SALARYFLG NUMERIC(1,0) NOT NULL,
176
        SALARYDAYS NUMERIC(4,0) NOT NULL,
177
        A_SALARYFLG NUMERIC(1,0) NOT NULL,
178
        A_SALARYDAYS NUMERIC(4,0) NOT NULL,
179
        I_SALARYFLG NUMERIC(1,0) NOT NULL,
180
        I_SALARYDAYS NUMERIC(4,0) NOT NULL,
181
        ENTRYDATE DATETIME NOT NULL,
182
        UPDATEDATE DATETIME NOT NULL,
183
         PRIMARY KEY (CONSTRUCTIONCODE)
184
);
185
186
CREATE TABLE CONSTRUCTIONBUDGETDETAIL
187
(        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
188
        GROUPCOUNT NUMERIC(2,0) NOT NULL,
189
        LINECOUNT NUMERIC(3,0) NOT NULL,
190
        COMPONENTCODE NUMERIC(5,0) NOT NULL,
191
        ITEMCODE NUMERIC(5,0) NOT NULL,
192
        FIRSTSTRING VARCHAR(120),
193
        SECONDSTRING VARCHAR(120),
194
        COMPANYTYPE NUMERIC(1,0) NOT NULL,
195
        COMPANYCODE NUMERIC(8,0) NOT NULL,
196
        COMPANYNAME VARCHAR(120),
197
        ESTIMATEPRICE NUMERIC(12,2) NOT NULL,
198
        NEGOTIATIONPRICE NUMERIC(12,2) NOT NULL,
199
        ORDERDESIREDAMOUNT NUMERIC(12,2) NOT NULL,
200
        EXECUTIONAMOUNT NUMERIC(12,2) NOT NULL,
201
        AMOUNTCONFIGRATE NUMERIC(5,2) NOT NULL,
202
        NEGOTIATEFLG NUMERIC(1,0) NOT NULL,
203
        ENTRYDATE DATETIME NOT NULL,
204
        UPDATEDATE DATETIME NOT NULL,
205
         PRIMARY KEY (CONSTRUCTIONCODE, GROUPCOUNT, LINECOUNT)
206
);
207
208
CREATE TABLE CONSTRUCTIONITEMMASTER
209
(        ITEMCODE NUMERIC(5,0) NOT NULL,
210
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
211
        ITEMNAME VARCHAR(120) DEFAULT '' NOT NULL,
212
        SUBITEMSFLG NUMERIC(1,0),
213
        MYEXPENSESFLG NUMERIC(1,0) NOT NULL,
214
        DELETEFLG NUMERIC(1,0) NOT NULL,
215
        ENTRYDATE DATETIME NOT NULL,
216
        UPDATEDATE DATETIME NOT NULL,
217
         PRIMARY KEY (ITEMCODE)
218
);
219
220
CREATE TABLE CONSTRUCTIONLEDGER
221
(        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
222
        CONSTRUCTIONPERIOD NUMERIC(4,0) NOT NULL,
223
        CREATORCODE NUMERIC(8,0),
224
        CREATORNAME VARCHAR(60),
225
        CREATEDATE DATE NOT NULL,
226
        CONSTRUCTIONTIMES NUMERIC(5,2) NOT NULL,
227
        CONSTRUCTIONSTART DATE NOT NULL,
228
        CONSTRUCTIONEND DATE NOT NULL,
229
        ORDERSDECISIONPRICE NUMERIC(14,2) NOT NULL,
230
        COMPANYEXPENSES NUMERIC(10,2) NOT NULL,
231
        DEPARTMENTEXPENSES NUMERIC(10,2) NOT NULL,
232
        SALESEXPENSES NUMERIC(10,2) NOT NULL,
233
        TOTALPAYMENT NUMERIC(10,2) NOT NULL,
234
        GROSSPROFIT NUMERIC(10,2) NOT NULL,
235
        ALLOWANCE NUMERIC(10,2) NOT NULL,
236
        NETPROFIT NUMERIC(10,2) NOT NULL,
237
        COMPLATEFLG NUMERIC(1,0) NOT NULL,
238
        INTEGRATIONFLG NUMERIC(1,0) NOT NULL,
239
        ENTRYDATE DATETIME NOT NULL,
240
        UPDATEDATE DATETIME NOT NULL,
241
         PRIMARY KEY (CONSTRUCTIONCODE)
242
);
243
244
CREATE TABLE CONSTRUCTIONLEDGERDETAIL
245
(        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
246
        GROUPCOUNT NUMERIC(2,0) NOT NULL,
247
        LINECOUNT NUMERIC(3,0) NOT NULL,
248
        COMPONENTCODE NUMERIC(5,0) NOT NULL,
249
        ITEMCODE NUMERIC(5,0) NOT NULL,
250
        FIRSTSTRING VARCHAR(120),
251
        SECONDSTRING VARCHAR(120),
252
        COMPANYTYPE NUMERIC(1,0) NOT NULL,
253
        COMPANYCODE NUMERIC(8,0) NOT NULL,
254
        COMPANYNAME VARCHAR(120),
255
        ESTIMATEPRICE NUMERIC(12,2) NOT NULL,
256
        EXECUTIONAMOUNT NUMERIC(12,2) NOT NULL,
257
        AMOUNTCONFIGRATE NUMERIC(5,2) NOT NULL,
258
        PAYMENTBURDEN NUMERIC(12,2) NOT NULL,
259
        FIXDATAFLG NUMERIC(1,0) NOT NULL,
260
        INDEPENDENTFLG NUMERIC(1,0) NOT NULL,
261
        FLUCTUATIONFLG NUMERIC(1,0) NOT NULL,
262
        SALARYFLG NUMERIC(1,0) NOT NULL,
263
        SALARYDAYS NUMERIC(4,0) NOT NULL,
264
        OPERATINGFLG NUMERIC(1,0) NOT NULL,
265
        ENTRYDATE DATETIME NOT NULL,
266
        UPDATEDATE DATETIME NOT NULL,
267
         PRIMARY KEY (CONSTRUCTIONCODE, GROUPCOUNT, LINECOUNT)
268
);
269
270
CREATE TABLE CONSTRUCTIONLEDGEREXCUTE
271
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
272
        GROUPCOUNT NUMERIC(2,0) NOT NULL,
273
        LINECOUNT NUMERIC(3,0) NOT NULL,
274
        COLUMNCOUNT NUMERIC(3,0) NOT NULL,
275
        PAYMENTAMOUNT NUMERIC(12,2) NOT NULL,
276
        TARGETMONTH DATE NOT NULL,
277
        ENTRYDATE DATETIME NOT NULL,
278
        UPDATEDATE DATETIME NOT NULL,
279
         PRIMARY KEY (CONSTRUCTIONCODE, GROUPCOUNT, LINECOUNT, COLUMNCOUNT)
280
);
281
282
CREATE TABLE CONSTRUCTIONLINK
283
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
284
        FLUCTUATIONCODE NUMERIC(10,0) NOT NULL,
285
        ENTRYDATE DATETIME NOT NULL,
286
        UPDATEDATE DATETIME NOT NULL,
287
         PRIMARY KEY (CONSTRUCTIONCODE, FLUCTUATIONCODE)
288
);
289
290
CREATE TABLE CONSTRUCTIONPROGRESSDATE
291
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
292
        CONSTRUCTIONSTATUSFLG NUMERIC(2,0) NOT NULL,
293
        PREVIOUSSTATUSFLG NUMERIC(2,0),
294
        CHANGEDATE DATE NOT NULL,
295
        CHANGEPERSONCODE NUMERIC(8,0) NOT NULL,
296
        ENTRYDATE DATETIME NOT NULL,
297
        UPDATEDATE DATETIME NOT NULL,
298
         PRIMARY KEY (CONSTRUCTIONCODE, CONSTRUCTIONSTATUSFLG)
299
);
300
301
CREATE TABLE CONSTRUCTIONSPECMASTER
302
 (        ITEMCODE NUMERIC(5,0) NOT NULL,
303
        SPECCODE NUMERIC(5,0) NOT NULL,
304
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
305
        ITEMNAME VARCHAR(120) DEFAULT '',
306
        SPECNAME VARCHAR(120),
307
        UNITNAME VARCHAR(30),
308
        UNITPRICE NUMERIC(9,2) NOT NULL,
309
        DELETEFLG NUMERIC(1,0) NOT NULL,
310
        ENTRYDATE DATETIME NOT NULL,
311
        UPDATEDATE DATETIME NOT NULL,
312
         PRIMARY KEY (ITEMCODE, SPECCODE)
313
);
314
315
CREATE TABLE CONSTRUCTIONSPECUNITPRICE
316
 (        COMPONENTCODE NUMERIC(5,0) NOT NULL,
317
        ITEMCODE NUMERIC(5,0) NOT NULL,
318
        SPECCODE NUMERIC(5,0) NOT NULL,
319
        CONSTRUCTIONTYPECODE NUMERIC(5,0) NOT NULL,
320
        UNITPRICE NUMERIC(9,2) NOT NULL,
321
        ENTRYDATE DATETIME NOT NULL,
322
        UPDATEDATE DATETIME NOT NULL,
323
         PRIMARY KEY (COMPONENTCODE, ITEMCODE, SPECCODE, CONSTRUCTIONTYPECODE)
324
);
325
326
CREATE TABLE CONSTRUCTIONTYPEMASTER
327
 (        TYPECODE NUMERIC(5,0) NOT NULL,
328
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
329
        NAMESTRING VARCHAR(100) DEFAULT '' NOT NULL,
330
        PUBLICFLG NUMERIC(1,0) NOT NULL,
331
        DELETEFLG NUMERIC(1,0) NOT NULL,
332
        ENTRYDATE DATETIME NOT NULL,
333
        UPDATEDATE DATETIME NOT NULL,
334
         PRIMARY KEY (TYPECODE)
335
);
336
337
CREATE TABLE COSTDATAOFPERSON
338
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
339
        ACTIONDATE DATE NOT NULL,
340
        DATATYPE NUMERIC(1,0) NOT NULL,
341
        DATAADDCOUNT NUMERIC(5,0) NOT NULL,
342
        TARGETMONTH VARCHAR(7) NOT NULL,
343
        CONSTRUCTIONCODE NUMERIC(10,0),
344
        SUPPLIERSCODE NUMERIC(5,0) NOT NULL,
345
        SUPPLIERSNAME VARCHAR(120),
346
        PAYMENTCONTENT VARCHAR(60),
347
        PAYMENTTYPE NUMERIC(1,0) NOT NULL,
348
        ENTRYPRICE NUMERIC(12,2) NOT NULL,
349
        COMPLATEFLG NUMERIC(1,0) NOT NULL,
350
        APPROVALFLG NUMERIC(1,0) NOT NULL,
351
        ENTRYDATE DATETIME NOT NULL,
352
        UPDATEDATE DATETIME NOT NULL,
353
         PRIMARY KEY (PERSONCODE, ACTIONDATE, DATATYPE, DATAADDCOUNT)
354
);
355
356
CREATE TABLE DAILYDATACONSTRUCTION
357
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
358
        DAILYDATADATE DATE NOT NULL,
359
        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
360
        WEATHER VARCHAR(60),
361
        ENTRYDATE DATETIME NOT NULL,
362
        UPDATEDATE DATETIME NOT NULL,
363
         PRIMARY KEY (PERSONCODE, DAILYDATADATE, CONSTRUCTIONCODE)
364
);
365
366
CREATE TABLE DAILYDATADETAIL
367
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
368
        DAILYDATADATE DATE NOT NULL,
369
        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
370
        SEQNO NUMERIC(3,0) NOT NULL,
371
        JOBCATEGORYCODE NUMERIC(5,0) NOT NULL,
372
        COMPANYCODE NUMERIC(8,0) NOT NULL,
373
        TODAYHEADCOUNT NUMERIC(3,0) NOT NULL,
374
        TOTALHEADCOUNT NUMERIC(4,0) NOT NULL,
375
        TODAYWORK VARCHAR(100),
376
        NEXTDAYWORK VARCHAR(100),
377
        NEXTDAYHEADCOUNT NUMERIC(3,0) NOT NULL,
378
        ENTRYDATE DATETIME NOT NULL,
379
        UPDATEDATE DATETIME NOT NULL,
380
         PRIMARY KEY (PERSONCODE, DAILYDATADATE, CONSTRUCTIONCODE, SEQNO)
381
);
382
383
CREATE TABLE DAILYDATAFIELD
384
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
385
        DAILYDATADATE DATE NOT NULL,
386
        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
387
        SEQNO NUMERIC(3,0) NOT NULL,
388
        PATROLTIME DATE NOT NULL,
389
        CONTENTSTEXT VARCHAR(200),
390
        ENTRYDATE DATETIME NOT NULL,
391
        UPDATEDATE DATETIME NOT NULL,
392
         PRIMARY KEY (PERSONCODE, DAILYDATADATE, CONSTRUCTIONCODE, SEQNO)
393
);
394
395
CREATE TABLE DAILYDATAMATERIALS
396
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
397
        DAILYDATADATE DATE NOT NULL,
398
        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
399
        SEQNO NUMERIC(3,0) NOT NULL,
400
        MATERIALS VARCHAR(100),
401
        QUANTITY VARCHAR(100),
402
        PRODUCTION VARCHAR(100),
403
        DELIVERY VARCHAR(100),
404
        QUALITYCONTROL VARCHAR(100),
405
        ENTRYDATE DATETIME NOT NULL,
406
        UPDATEDATE DATETIME NOT NULL,
407
         PRIMARY KEY (PERSONCODE, DAILYDATADATE, CONSTRUCTIONCODE, SEQNO)
408
);
409
410
CREATE TABLE DAILYDATASUBCONTRACTORS
411
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
412
        DAILYDATADATE DATE NOT NULL,
413
        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
414
        SEQNO NUMERIC(3,0) NOT NULL,
415
        ATTENDEE VARCHAR(100),
416
        CONTENTSTEXT VARCHAR(200),
417
        ENTRYDATE DATETIME NOT NULL,
418
        UPDATEDATE DATETIME NOT NULL,
419
         PRIMARY KEY (PERSONCODE, DAILYDATADATE, CONSTRUCTIONCODE, SEQNO)
420
);
421
422
CREATE TABLE DAILYDATAVEHICLES
423
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
424
        DAILYDATADATE DATE NOT NULL,
425
        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
426
        SEQNO NUMERIC(3,0) NOT NULL,
427
        MODEL VARCHAR(100),
428
        PERFORMANCE VARCHAR(100),
429
        OWNER VARCHAR(100),
430
        DRIVER VARCHAR(100),
431
        STARTWORKINGTIME DATE NOT NULL,
432
        ENDWORKINGTIME DATE NOT NULL,
433
        ENTRYDATE DATETIME NOT NULL,
434
        UPDATEDATE DATETIME NOT NULL,
435
         PRIMARY KEY (PERSONCODE, DAILYDATADATE, CONSTRUCTIONCODE, SEQNO)
436
);
437
438
CREATE TABLE DEPARTMENTEXPENSESMASTER
439
 (        DEPARTMENTCODE NUMERIC(5,0) NOT NULL,
440
        EXPENSESPERIOD NUMERIC(4,0) NOT NULL,
441
        NAMECODE NUMERIC(5,0) NOT NULL,
442
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
443
        EXPENSESRATIO NUMERIC(4,2) NOT NULL,
444
        DELETEFLG NUMERIC(1,0) NOT NULL,
445
        ENTRYDATE DATETIME NOT NULL,
446
        UPDATEDATE DATETIME NOT NULL,
447
         PRIMARY KEY (DEPARTMENTCODE, EXPENSESPERIOD, NAMECODE)
448
);
449
450
CREATE TABLE DEPARTMENTMASTER
451
 (        DEPARTMENTCODE NUMERIC(5,0) NOT NULL,
452
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
453
        DEPARTMENTSTRING VARCHAR(100) DEFAULT '' NOT NULL,
454
        ACTIONSCHEDULEFLG NUMERIC(1,0) NOT NULL,
455
        STAFFASSIGNFLG NUMERIC(1,0) NOT NULL,
456
        DELETEFLG NUMERIC(1,0) NOT NULL,
457
        ENTRYDATE DATETIME NOT NULL,
458
        UPDATEDATE DATETIME NOT NULL,
459
         PRIMARY KEY (DEPARTMENTCODE)
460
);
461
462
CREATE TABLE DIVISIONMASTER
463
 (        DIVISIONCODE NUMERIC(5,0) NOT NULL,
464
        NAMECODE NUMERIC(5,0) NOT NULL,
465
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
466
        NAMESTRING VARCHAR(100) DEFAULT '' NOT NULL,
467
        DELETEFLG NUMERIC(1,0) NOT NULL,
468
        ENTRYDATE DATETIME NOT NULL,
469
        UPDATEDATE DATETIME NOT NULL,
470
         PRIMARY KEY (DIVISIONCODE, NAMECODE)
471
);
472
473
CREATE TABLE ESTIMATEBUDGET
474
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
475
        CONSTRUCTIONTIME NUMERIC(5,2) NOT NULL,
476
        INTEGRATEDCODE NUMERIC(8,0) NOT NULL,
477
        DATACREATEDATE DATE NOT NULL,
478
        RETVALUE1 NUMERIC(12,2) NOT NULL,
479
        RETVALUE2 NUMERIC(12,2) NOT NULL,
480
        RETVALUE3 NUMERIC(12,2) NOT NULL,
481
        RETVALUE4 NUMERIC(12,2) NOT NULL,
482
        RETPERCENT NUMERIC(5,2) NOT NULL,
483
        ENTRYDATE DATETIME NOT NULL,
484
        UPDATEDATE DATETIME,
485
         PRIMARY KEY (CONSTRUCTIONCODE)
486
);
487
488
CREATE TABLE ESTIMATEBUDGETDETAIL
489
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
490
        GROUPCOUNT NUMERIC(2,0) NOT NULL,
491
        LINECOUNT NUMERIC(3,0) NOT NULL,
492
        COMPONENTCODE NUMERIC(5,0) NOT NULL,
493
        ITEMCODE NUMERIC(5,0),
494
        COMPANYCODE NUMERIC(8,0) NOT NULL,
495
        FIRSTSTRING VARCHAR(120),
496
        SECONDSTRING VARCHAR(120),
497
        ESTIMATEPRICE NUMERIC(12,2) NOT NULL,
498
        NEGOTIATIONPRICE NUMERIC(12,2) NOT NULL,
499
        NOTES VARCHAR(120),
500
        ENTRYDATE DATETIME NOT NULL,
501
        UPDATEDATE DATETIME NOT NULL,
502
         PRIMARY KEY (CONSTRUCTIONCODE, GROUPCOUNT, LINECOUNT)
503
);
504
505
CREATE TABLE ESTIMATEDATA
506
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
507
        LINECOUNT NUMERIC(3,0) NOT NULL,
508
        COMPONENTCODE NUMERIC(3,0) NOT NULL,
509
        FIXEDITEMCODE VARCHAR(1),
510
        ITEMNAME VARCHAR(120),
511
        WORKNAME VARCHAR(120),
512
        PRICEVALUE NUMERIC(14,2) NOT NULL,
513
        NOTE VARCHAR(60),
514
        MYEXPENSESFLG NUMERIC(1,0) NOT NULL,
515
        INPUTFLG NUMERIC(1,0) NOT NULL,
516
        ENTRYDATE DATETIME NOT NULL,
517
        UPDATEDATE DATETIME NOT NULL,
518
         PRIMARY KEY (CONSTRUCTIONCODE, LINECOUNT)
519
);
520
521
CREATE TABLE ESTIMATEDATABODY
522
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
523
        PAGECOUNT NUMERIC(4,0) NOT NULL,
524
        CATEGORY NUMERIC(1,0) NOT NULL,
525
        UNIONCOMPONENTCODE NUMERIC(5,0) NOT NULL,
526
        COMPONENTCODE NUMERIC(5,0) NOT NULL,
527
        ITEMCODE NUMERIC(5,0) NOT NULL,
528
        SELECTCOMPONENT NUMERIC(5,0) NOT NULL,
529
        PAGETITLE VARCHAR(120) NOT NULL,
530
        DETAILLINECOUNT NUMERIC(3,0) NOT NULL,
531
        ENTRYDATE DATETIME NOT NULL,
532
        UPDATEDATE DATETIME NOT NULL,
533
         PRIMARY KEY (CONSTRUCTIONCODE, PAGECOUNT)
534
);
535
536
CREATE TABLE ESTIMATEDATADETAIL
537
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
538
        PAGECOUNT NUMERIC(4,0) NOT NULL,
539
        LINECOUNT NUMERIC(3,0) NOT NULL,
540
        DATATYPE NUMERIC(1,0) NOT NULL,
541
        COMPONENTCODE NUMERIC(5,0) NOT NULL,
542
        ITEMCODE NUMERIC(5,0) NOT NULL,
543
        SPECCODE NUMERIC(5,0) NOT NULL,
544
        ITEMNAME VARCHAR(120),
545
        SPECNAME VARCHAR(120),
546
        UNITCOUNT NUMERIC(8,2) NOT NULL,
547
        UNITNAME VARCHAR(30),
548
        UNITPRICE NUMERIC(9,2) NOT NULL,
549
        LINETOTAL NUMERIC(12,2) NOT NULL,
550
        NOTE VARCHAR(60),
551
        COMPANYCODE NUMERIC(8,0) NOT NULL,
552
        MYEXPENSESFLG NUMERIC(1,0) NOT NULL,
553
        INPUTFLG NUMERIC(1,0),
554
        ENTRYDATE DATETIME NOT NULL,
555
        UPDATEDATE DATETIME NOT NULL,
556
         PRIMARY KEY (CONSTRUCTIONCODE, PAGECOUNT, LINECOUNT)
557
);
558
559
CREATE TABLE EXPENSESMASTER
560
 (        DIVISIONCODE NUMERIC(5,0) NOT NULL,
561
        NAMECODE NUMERIC(5,0) NOT NULL,
562
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
563
        EXPENSESRATIO NUMERIC(4,2) NOT NULL,
564
        DELETEFLG NUMERIC(1,0) NOT NULL,
565
        ENTRYDATE DATETIME NOT NULL,
566
        UPDATEDATE DATETIME NOT NULL,
567
         PRIMARY KEY (DIVISIONCODE, NAMECODE)
568
);
569
570
CREATE TABLE HOLIDAYCALENDERMASTER
571
 (        HOLIDAY DATE NOT NULL,
572
        BUSINESSYEAR NUMERIC(4,0) NOT NULL,
573
        TARGETMONTH NUMERIC(2,0) NOT NULL,
574
        TARGETDAY NUMERIC(2,0) NOT NULL,
575
         PRIMARY KEY (HOLIDAY)
576
);
577
578
CREATE TABLE INPUTSEARCHLOGDATA
579
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
580
        USEDPROCESSNO NUMERIC(3,0) NOT NULL,
581
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
582
        DATATYPE NUMERIC(1,0) NOT NULL,
583
        INPUTCODE NUMERIC(10,0),
584
         PRIMARY KEY (CONSTRUCTIONCODE, USEDPROCESSNO, DISPLAYORDER)
585
);
586
587
CREATE TABLE MESSAGEBOARDDATA
588
 (        RECORDNUMBER NUMERIC(6,0) NOT NULL,
589
        BRANCHNUMBER NUMERIC(3,0) NOT NULL,
590
        FROMCODE NUMERIC(8,0) NOT NULL,
591
        FROMNAME VARCHAR(60) NOT NULL,
592
        MESSAGETITILE VARCHAR(100),
593
        MESSAGECONTENT VARCHAR(1333) NOT NULL,
594
        LINKTYPE NUMERIC(2,0) NOT NULL,
595
        LINKMESSAGE VARCHAR(200),
596
        LINKCODE VARCHAR(30),
597
        WRITINGDATE DATE NOT NULL,
598
        PERSONCODE NUMERIC(8,0) NOT NULL,
599
        SHAREFLAG NUMERIC(2,0) NOT NULL,
600
        MESSAGECOLOR VARCHAR(8),
601
        BACKCOLOR VARCHAR(8),
602
        MESSAGEFLAG NUMERIC(1,0) NOT NULL,
603
        ENTRYDATE DATETIME,
604
        UPDATEDATE DATETIME,
605
         PRIMARY KEY (RECORDNUMBER, BRANCHNUMBER)
606
);
607
608
CREATE TABLE MESSAGEBOARDTERGET
609
 (        RECORDNUMBER NUMERIC(6,0) NOT NULL,
610
        BRANCHNUMBER NUMERIC(3,0) NOT NULL,
611
        SEQNUM NUMERIC(3,0) NOT NULL,
612
        TOCODE NUMERIC(8,0) NOT NULL,
613
        TONAME VARCHAR(60) NOT NULL,
614
        ENTRYDATE DATETIME,
615
        UPDATEDATE DATETIME,
616
         PRIMARY KEY (RECORDNUMBER, BRANCHNUMBER, SEQNUM)
617
);
618
619
CREATE TABLE MESSAGEBROWSINGHISTORY
620
 (        RECORDNUMBER NUMERIC(6,0) NOT NULL,
621
        BRANCHNUMBER NUMERIC(3,0) NOT NULL,
622
        SEQNUM NUMERIC(3,0) NOT NULL,
623
        BROWSINGCODE NUMERIC(8,0) NOT NULL,
624
        BROWSINGDATE DATE NOT NULL,
625
        ENTRYDATE DATETIME,
626
        UPDATEDATE DATETIME,
627
         PRIMARY KEY (RECORDNUMBER, BRANCHNUMBER, SEQNUM)
628
);
629
630
CREATE TABLE ORDERERSMASTER
631
 (        ORDERCOTEGORY NUMERIC(5,0) NOT NULL,
632
        ORDERERSCODE NUMERIC(5,0) NOT NULL,
633
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
634
        CORPORATESTATUSNAME VARCHAR(100),
635
        CORPORATESTATUSPOINT NUMERIC(1,0),
636
        ORDERERSNAME1 VARCHAR(60) DEFAULT '' NOT NULL,
637
        ORDERERSNAME2 VARCHAR(60),
638
        ZIPCODE VARCHAR(8),
639
        ADDRESS1 VARCHAR(60),
640
        ADDRESS2 VARCHAR(60) DEFAULT '',
641
        ADDRESS3 VARCHAR(60),
642 32 bit
        PHONENUMBER VARCHAR(13) DEFAULT '',
643
        FAXNUMBER VARCHAR(13) DEFAULT '',
644 27 bit
        NOTE VARCHAR(300) DEFAULT '',
645
        DELETEFLG NUMERIC(1,0) NOT NULL,
646
        ENTRYDATE DATETIME NOT NULL,
647
        UPDATEDATE DATETIME NOT NULL,
648
         PRIMARY KEY (ORDERCOTEGORY, ORDERERSCODE)
649
);
650
651
CREATE TABLE ORDERSPRICEDATA
652
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
653
        CHANGENO NUMERIC(3,0) NOT NULL,
654
        CHANGEDATE DATE NOT NULL,
655
        CHANGEPERSONCODE NUMERIC(8,0) NOT NULL,
656
        CHANGEPERSONNAME VARCHAR(60),
657
        BEFOREVALUE NUMERIC(14,2) NOT NULL,
658
        BEFOREVALUEINTAX NUMERIC(14,2) NOT NULL,
659
        AFTERVALUE NUMERIC(14,2) NOT NULL,
660
        AFTERVALUEINTAX NUMERIC(14,2) NOT NULL,
661
        CHANGECOMMENT VARCHAR(200),
662
        ENTRYDATE DATETIME,
663
        UPDATEDATE DATETIME,
664
         PRIMARY KEY (CONSTRUCTIONCODE, CHANGENO)
665
);
666
667
CREATE TABLE PERSONINCHARGEMASTER
668
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
669
        DISPLAYORDER NUMERIC(8,0) NOT NULL,
670
        PERSONNAME VARCHAR(60) DEFAULT '' NOT NULL,
671
        STARTDATE DATE NOT NULL,
672
        ENDDATE DATE,
673
        PASSWORD VARCHAR(16),
674
        SECURITYMANAGEMENT NUMERIC(1,0) NOT NULL,
675
        MSGBACKCOLOR VARCHAR(8),
676
        DISPLAYSTRING VARCHAR(20),
677
        DEPARTMENTCODE NUMERIC(5,0),
678
        MONTHLYSALARY NUMERIC(11,3) NOT NULL,
679
        YEARSALARY NUMERIC(12,3) NOT NULL,
680
        QUALIFICATION VARCHAR(120),
681
        SEALPRINTNAME VARCHAR(5),
682
        EMPLOYEECLASSFLG NUMERIC(1,0) NOT NULL,
683
        LEDGERFLG NUMERIC(1,0) NOT NULL,
684
        DELETEFLG NUMERIC(1,0) NOT NULL,
685
        ENTRYDATE DATETIME NOT NULL,
686
        UPDATEDATE DATETIME NOT NULL,
687
         PRIMARY KEY (PERSONCODE)
688
);
689
690
CREATE TABLE POINTINGOUTCOMMENT
691
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
692
        PROCESSNO NUMERIC(3,0) NOT NULL,
693
        SEQNO NUMERIC(3,0) NOT NULL,
694
        PAGECOUNT NUMERIC(4,0) NOT NULL,
695
        PERSONCODE NUMERIC(8,0) NOT NULL,
696
        DROWCOLOR VARCHAR(8),
697
        COMMENTMESSAGE VARCHAR(1000),
698
        STARTPOINTX NUMERIC(4,0) NOT NULL,
699
        STARTPOINTY NUMERIC(4,0) NOT NULL,
700
        CURRENTPOINTX NUMERIC(4,0) NOT NULL,
701
        CURRENTPOINTY NUMERIC(4,0) NOT NULL,
702
        CURRENTWIDTH NUMERIC(4,0) NOT NULL,
703
        CURRENTHEIGHT NUMERIC(4,0) NOT NULL,
704
        ENTRYDATE DATETIME NOT NULL,
705
        UPDATEDATE DATETIME NOT NULL,
706
         PRIMARY KEY (CONSTRUCTIONCODE, PROCESSNO, SEQNO)
707
);
708
709
CREATE TABLE PROCEEDINGSDATA
710
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
711
        PROCEEDINGSDATADATE DATE NOT NULL,
712
        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
713
        STARTMEETINGTIME DATE NOT NULL,
714
        ENDMEETINGTIME DATE NOT NULL,
715
        MEETINGPALCE1 VARCHAR(100),
716
        MEETINGPALCE2 VARCHAR(100),
717
        MEETINGPALCE3 VARCHAR(100),
718
        ENTRYDATE DATETIME NOT NULL,
719
        UPDATEDATE DATETIME NOT NULL,
720
         PRIMARY KEY (PERSONCODE, PROCEEDINGSDATADATE, CONSTRUCTIONCODE)
721
);
722
723
CREATE TABLE PROCEEDINGSDATAATTENDEE
724
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
725
        PROCEEDINGSDATADATE DATE NOT NULL,
726
        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
727
        SEQNO NUMERIC(3,0) NOT NULL,
728
        DEPARTMENT VARCHAR(100),
729
        ATTENDEENAME VARCHAR(100),
730
        ENTRYDATE DATETIME NOT NULL,
731
        UPDATEDATE DATETIME NOT NULL,
732
         PRIMARY KEY (PERSONCODE, PROCEEDINGSDATADATE, CONSTRUCTIONCODE, SEQNO)
733
);
734
735
CREATE TABLE PROCEEDINGSDATADETAIL
736
 (        PERSONCODE NUMERIC(8,0) NOT NULL,
737
        PROCEEDINGSDATADATE DATE NOT NULL,
738
        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
739
        SEQNO NUMERIC(3,0) NOT NULL,
740
        TITILENO NUMERIC(3,0),
741
        TITILE VARCHAR(100),
742
        CONTENTSTEXT VARCHAR(200),
743
        ENTRYDATE DATETIME NOT NULL,
744
        UPDATEDATE DATETIME NOT NULL,
745
         PRIMARY KEY (PERSONCODE, PROCEEDINGSDATADATE, CONSTRUCTIONCODE, SEQNO)
746
);
747
748
CREATE TABLE PROCESSAPPROVAL
749
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
750
        APPROVALCODE NUMERIC(3,0) NOT NULL,
751
        SEQNO NUMERIC(2,0) NOT NULL,
752
        PERSONCODE NUMERIC(8,0) NOT NULL,
753
        PETITIONAPPROVALDATE DATE NOT NULL,
754
        APPROVALLIMITDATES DATE NOT NULL,
755
        APPROVALSTATUS NUMERIC(1,0) NOT NULL,
756
        INPUTCOMMENT VARCHAR(300),
757
        ENTRYDATE DATETIME NOT NULL,
758
        UPDATEDATE DATETIME NOT NULL,
759
         PRIMARY KEY (CONSTRUCTIONCODE, APPROVALCODE, SEQNO)
760
);
761
762
CREATE TABLE PURCHASEORDER
763
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
764
        SEQNO NUMERIC(3,0) NOT NULL,
765
        COMPANYCODE NUMERIC(8,0) NOT NULL,
766
        CREATEDATE DATE,
767
        ORDERPRICE NUMERIC(12,2) NOT NULL,
768
        LASTROWSTRINGDATE DATE NOT NULL,
769
        ORDERSHEETTYPE NUMERIC(1,0) NOT NULL,
770
        PAYMENTTERMS NUMERIC(1,0) NOT NULL,
771
        CASHRATIO NUMERIC(4,1) NOT NULL,
772
        BILLPERIOD NUMERIC(4,0) NOT NULL,
773
        PREPAYMENTS NUMERIC(1,0) NOT NULL,
774
        PREPAYMENTSDAYS NUMERIC(3,0) NOT NULL,
775
        PREPAYMENTSPRICE NUMERIC(12,2) NOT NULL,
776
        PARTIALPAYMENT NUMERIC(1,0) NOT NULL,
777
        PARTIALPAYMENTMOUNTH NUMERIC(2,0) NOT NULL,
778
        PARTIALPAYMENTDAY1 NUMERIC(2,0) NOT NULL,
779
        PARTIALPAYMENTDAY2 NUMERIC(2,0) NOT NULL,
780
        PARTIALPAYMENTPRICE NUMERIC(12,2) NOT NULL,
781
        COMPLETIONPAYMENT NUMERIC(1,0) NOT NULL,
782
        COMPLETIONPAYMENTDAYS NUMERIC(3,0) NOT NULL,
783
        COMPLETIONPAYMENTPRICE NUMERIC(12,2) NOT NULL,
784
        LEADENGINEERCODE NUMERIC(8,0),
785
        LEADENGINEERNAME VARCHAR(60),
786
        SAFETYOFFICERCODE NUMERIC(8,0),
787
        SAFETYOFFICERNAME VARCHAR(60),
788
        WORKERSCOUNT NUMERIC(3,0),
789
        PRINTOUTDATE DATE NOT NULL,
790
        ENTRYDATE DATETIME NOT NULL,
791
        UPDATEDATE DATETIME NOT NULL,
792
         PRIMARY KEY (CONSTRUCTIONCODE, SEQNO)
793
);
794
795
CREATE TABLE PURCHASEORDERDETAIL
796
 (        CONSTRUCTIONCODE NUMERIC(10,0) NOT NULL,
797
        SEQNO NUMERIC(3,0) NOT NULL,
798
        GROUPCOUNT NUMERIC(1,0) NOT NULL,
799
        LINECOUNT NUMERIC(3,0) NOT NULL,
800
        COMPONENTCODE NUMERIC(5,0) NOT NULL,
801
        ITEMCODE NUMERIC(5,0) NOT NULL,
802
        FIRSTSTRING VARCHAR(120),
803
        SECONDSTRING VARCHAR(120),
804
        UNITCOUNT NUMERIC(8,2) NOT NULL,
805
        UNITNAME VARCHAR(30),
806
        UNITPRICE NUMERIC(10,2) NOT NULL,
807
        ORDERSLINEPRICE NUMERIC(12,2),
808
        ENTRYDATE DATETIME NOT NULL,
809
        UPDATEDATE DATETIME NOT NULL,
810
         PRIMARY KEY (CONSTRUCTIONCODE, SEQNO, GROUPCOUNT, LINECOUNT)
811
);
812
813
CREATE TABLE SALESGRAPHDATA
814
 (        GRAPHDATACODE NUMERIC(8,0) NOT NULL,
815
        CONSTRUCTIONPERIOD NUMERIC(4,0) NOT NULL,
816
        SALESDATADAYS DATE NOT NULL,
817
        DISPLAYORDER NUMERIC(8,0) NOT NULL,
818
        DATANAME VARCHAR(100) NOT NULL,
819
        SALESAMOUNT NUMERIC(10,0) NOT NULL,
820
        ADMINISTRATIVEEXPENSE NUMERIC(10,0) NOT NULL,
821
        GROSSPROFIT NUMERIC(10,0) NOT NULL,
822
        NETINCOME NUMERIC(10,0) NOT NULL,
823
        ENTRYDATE DATETIME NOT NULL,
824
        UPDATEDATE DATETIME NOT NULL,
825
         PRIMARY KEY (GRAPHDATACODE, CONSTRUCTIONPERIOD, SALESDATADAYS)
826
);
827
828
CREATE TABLE SUBCONTRACTORITEMMASTER
829
 (        ITEMCODE NUMERIC(5,0) NOT NULL,
830
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
831
        ITEMNAME VARCHAR(120) DEFAULT '' NOT NULL,
832
        DELETEFLG NUMERIC(1,0) NOT NULL,
833
        ENTRYDATE DATETIME NOT NULL,
834
        UPDATEDATE DATETIME NOT NULL,
835
         PRIMARY KEY (ITEMCODE)
836
);
837
838
CREATE TABLE SUBCONTRACTORJOBCATEGORY
839
 (        JOBCATEGORYCODE NUMERIC(5,0) NOT NULL,
840
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
841
        JOBCATEGORYNAME VARCHAR(120) DEFAULT '' NOT NULL,
842
        DELETEFLG NUMERIC(1,0) NOT NULL,
843
        ENTRYDATE DATETIME NOT NULL,
844
        UPDATEDATE DATETIME NOT NULL,
845
         PRIMARY KEY (JOBCATEGORYCODE)
846
);
847
848
CREATE TABLE SUBCONTRACTORJOBITEM
849
 (        COMPANYCODE NUMERIC(8,0) NOT NULL,
850
        ITEMCODE NUMERIC(5,0) NOT NULL,
851
        DISPLAYORDER NUMERIC(8,0) NOT NULL,
852
        ENTRYDATE DATETIME NOT NULL,
853
        UPDATEDATE DATETIME NOT NULL,
854
         PRIMARY KEY (COMPANYCODE, ITEMCODE)
855
);
856
857
CREATE TABLE SUBCONTRACTORJOBLINK
858
 (        COMPANYCODE NUMERIC(8,0) NOT NULL,
859
        JOBCATEGORYCODE NUMERIC(5,0) NOT NULL,
860
        DISPLAYORDER NUMERIC(8,0) NOT NULL,
861
        ENTRYDATE DATETIME NOT NULL,
862
        UPDATEDATE DATETIME NOT NULL,
863
         PRIMARY KEY (COMPANYCODE, JOBCATEGORYCODE)
864
);
865
866
CREATE TABLE SUBCONTRACTORMASTER
867
 (        COMPANYCODE NUMERIC(8,0) NOT NULL,
868
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
869
        CORPORATESTATUSNAME VARCHAR(40) DEFAULT '',
870
        CORPORATESTATUSPOINT NUMERIC(1,0) NOT NULL,
871
        COMPANYNAME VARCHAR(100) DEFAULT '' NOT NULL,
872
        CEOPOSITIONNAME VARCHAR(60) DEFAULT '',
873
        CEONAME VARCHAR(60) DEFAULT '',
874
        CONTACTPERSONNAME VARCHAR(60),
875
        ZIPCODE VARCHAR(8),
876
        ADDRESS1 VARCHAR(60),
877
        ADDRESS2 VARCHAR(60) DEFAULT '',
878
        ADDRESS3 VARCHAR(60),
879 29 bit
        CELLPHONENUMBER VARCHAR(13),
880 27 bit
        MAILADDRESS VARCHAR(257),
881
        PHONENUMBER VARCHAR(13) DEFAULT '',
882
        FAXNUMBER VARCHAR(13) DEFAULT '',
883
        JAPANESESYLLABARY VARCHAR(2),
884
        STARTDATE DATE NOT NULL,
885
        NOTE VARCHAR(300) DEFAULT '',
886
        LABOURKIND NUMERIC(1,0) NOT NULL,
887
        DELETEFLG NUMERIC(1,0) DEFAULT 0 NOT NULL,
888
        ENTRYDATE DATETIME NOT NULL,
889
        UPDATEDATE DATETIME NOT NULL,
890
         PRIMARY KEY (COMPANYCODE)
891
);
892
893
CREATE TABLE SUPPLIERSMASTER
894
 (        SUPPLIERSCODE NUMERIC(5,0) NOT NULL,
895
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
896
        SUPPLIERSNAME1 VARCHAR(60) DEFAULT '' NOT NULL,
897
        SUPPLIERSNAME2 VARCHAR(60),
898
        ZIPCODE VARCHAR(8),
899
        ADDRESS1 VARCHAR(60),
900
        ADDRESS2 VARCHAR(60) DEFAULT '',
901
        ADDRESS3 VARCHAR(60),
902
        PHONENUMBER VARCHAR(13) DEFAULT '',
903
        FAXNUMBER VARCHAR(13) DEFAULT '',
904
        NOTE VARCHAR(300) DEFAULT '',
905
        DELETEFLG NUMERIC(1,0) NOT NULL,
906
        ENTRYDATE DATETIME NOT NULL,
907
        UPDATEDATE DATETIME NOT NULL,
908
         PRIMARY KEY (SUPPLIERSCODE)
909
);
910
911
CREATE TABLE SYSTEMEXECUTE
912
 (        PRIMARYCODE NUMERIC(3,0) NOT NULL,
913
        TARGETDATE DATE NOT NULL,
914
        ENTRYDATE DATETIME NOT NULL,
915
        UPDATEDATE DATETIME NOT NULL,
916
         PRIMARY KEY (PRIMARYCODE)
917
);
918
919
CREATE TABLE SYSTEMMASTER
920
 (        SYSTEMCODE NUMERIC(3,0) NOT NULL,
921
        COMPANYNAME1 VARCHAR(60) DEFAULT '' NOT NULL,
922
        COMPANYNAME2 VARCHAR(60) DEFAULT '',
923
        CEONAME VARCHAR(60) DEFAULT '' NOT NULL,
924
        CEOPOSITIONNAME VARCHAR(60) DEFAULT '',
925
        ZIPCODE VARCHAR(8) NOT NULL,
926
        ADDRESS1 VARCHAR(60) NOT NULL,
927
        ADDRESS2 VARCHAR(60) DEFAULT '',
928
        ADDRESS3 VARCHAR(60),
929
        PHONENUMBER VARCHAR(13) DEFAULT '' NOT NULL,
930
        FAXNUMBER VARCHAR(13) DEFAULT '',
931
        CONSTRUCTIONEXPENSES NUMERIC(4,2) NOT NULL,
932
        OFFICEEXPENSES NUMERIC(4,2) NOT NULL,
933
        OPERATINGEXPENSES NUMERIC(4,2) NOT NULL,
934
        CONSUMPTIONTAX NUMERIC(4,2) NOT NULL,
935
        EXCELSAVEPATH VARCHAR(120),
936
        BUSINESSPERIOD NUMERIC(4,0) NOT NULL,
937
        CONSTRUCTIONYEAR NUMERIC(4,0) NOT NULL,
938
        BUSINESSBEGINNINGDATE VARCHAR(5) NOT NULL,
939
        CONSTRUCTIONBEGINNINGDATE VARCHAR(5) NOT NULL,
940
        CONSTRUCTIONNOBASE NUMERIC(1,0) NOT NULL,
941
        SLOGANSTRING1 VARCHAR(100),
942
        SLOGANSTRING2 VARCHAR(100),
943
        SLOGANSTRING3 VARCHAR(100),
944
        ENTRYDATE DATETIME NOT NULL,
945
        UPDATEDATE DATETIME NOT NULL,
946
         PRIMARY KEY (SYSTEMCODE)
947
);
948
949
CREATE TABLE TERMMASTER
950
 (        CONSTRUCTIONSTATUSFLG NUMERIC(2,0) NOT NULL,
951
        FIELDNO NUMERIC(2,0) NOT NULL,
952
        SEQNO NUMERIC(2,0) NOT NULL,
953
        DISPLAYORDER NUMERIC(2,0) NOT NULL,
954
        CHECKSCHDULE NUMERIC(1,0) NOT NULL,
955
        TERMDAYS NUMERIC(3,0) NOT NULL,
956
        SENDTITILE VARCHAR(100),
957
        SENDMESSAGE VARCHAR(100),
958
        BACKCOLOR VARCHAR(8),
959
        FORECOLOR VARCHAR(8),
960
        ENTRYDATE DATETIME NOT NULL,
961
        UPDATEDATE DATETIME NOT NULL,
962
         PRIMARY KEY (CONSTRUCTIONSTATUSFLG, FIELDNO, SEQNO)
963
);
964
965
CREATE TABLE UNITMASTER
966
 (        UNITKEY NUMERIC(5,0) NOT NULL,
967
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
968
        UNITNAME VARCHAR(30) NOT NULL,
969
        ENTRYDATE DATETIME NOT NULL,
970
        UPDATEDATE DATETIME NOT NULL,
971
         PRIMARY KEY (UNITKEY)
972
);
973
974
CREATE TABLE VEHICLEMASTER
975
 (        VEHICLECODE NUMERIC(5,0) NOT NULL,
976
        DISPLAYORDER NUMERIC(5,0) NOT NULL,
977
        VEHICLENAME VARCHAR(100) NOT NULL,
978
        REGISTRATIONNUMBER VARCHAR(30),
979
        IDENTIFICATIONNUMBER VARCHAR(30),
980
        MODELCODE VARCHAR(30),
981
        DEPARTMENTCODE NUMERIC(5,0) NOT NULL,
982
        VEHICLESCHEDULEFLG NUMERIC(1,0) NOT NULL,
983
        PURCHASEDATE DATE,
984
        PURCHASENAME VARCHAR(30),
985
        PURCHASECONTACTPERSONS VARCHAR(30),
986
        PURCHASEPHONE VARCHAR(13),
987
        LEASEDATE DATE,
988
        LEASEDESTINATION VARCHAR(30),
989
        LEASECONTACTPERSONS VARCHAR(30),
990
        LEASEPHONE VARCHAR(13),
991
        INSURANCECOMPANY VARCHAR(30),
992
        INSURANCECONTACTPERSONS VARCHAR(30),
993
        INSURANCEPHONE VARCHAR(13),
994
        NOTE VARCHAR(300),
995
        ENTRYDATE DATETIME,
996
        UPDATEDATE DATETIME,
997
         PRIMARY KEY (VEHICLECODE)
998
);
999
1000
CREATE TABLE VEHICLERECORDDATA
1001
 (        VEHICLECODE NUMERIC(5,0) NOT NULL,
1002
        DIVISIONCODE NUMERIC(2,0) NOT NULL,
1003
        SEQNO NUMERIC(3,0) NOT NULL,
1004
        RECORDDATE DATE,
1005
        MILEAGE NUMERIC(7,0),
1006
        CONTENT VARCHAR(100),
1007
        PAYMENTCOST NUMERIC(10,2),
1008
        ENTRYDATE DATETIME NOT NULL,
1009
        UPDATEDATE DATETIME NOT NULL,
1010
         PRIMARY KEY (VEHICLECODE, DIVISIONCODE, SEQNO)
1011
);
1012
1013
CREATE TABLE VEHICLESCHEDULEDATA
1014
( TARGETDATE DATE NOT NULL,
1015
        VEHICLECODE NUMERIC(5,0) NOT NULL,
1016
        MORNINGAFTERNOON NUMERIC(1,0) NOT NULL,
1017
        PERSONCODE NUMERIC(8,0) NOT NULL,
1018
        TARGETYEAR NUMERIC(4,0) NOT NULL,
1019
        TARGETMONTH NUMERIC(2,0) NOT NULL,
1020
        TARGETDAY NUMERIC(2,0) NOT NULL,
1021
        ENTRYDATE DATETIME NOT NULL,
1022
        UPDATEDATE DATETIME NOT NULL,
1023
         PRIMARY KEY (TARGETDATE, VEHICLECODE, MORNINGAFTERNOON)
1024
);