Unanet Data Model

TIMESHEET_DATA

Column Name Data Type Nulls
time_data_key decimal (15,0)  
person_time_key decimal (15,0)  
customer_key decimal (15,0)  
customer_code varchar (25)  
project_key decimal (15,0)  
project_code varchar (30)  
task_key decimal (15,0) YES
task_name varchar (50) YES
work_date datetime  
quantity decimal (15,2)  
bill_rate decimal (15,4) YES
cost_rate decimal (15,4) YES
project_type_key decimal (15,0)  
comments text YES
bill_customer decimal (15,0) YES
pay_code_key decimal (15,0)  
pay_code varchar (10)  
project_type varchar (10)  
account_code varchar (64) YES

  Tables Used  

TASK
PAY_CODE
PERSON_TIME_DATA
PROJECT_TYPE
CUSTOMER
PERSON_TIME
PROJECT

SQL*Server Create Statement:

CREATE VIEW timesheet_data AS
SELECT td.time_data_key, td.person_time_key, pr.customer_key, c.customer_code,
       td.project_key, pr.project_code, td.task_key, tk.task_name, td.work_date,
       td.quantity, td.bill_rate, td.cost_rate, td.project_type_key, td.comments,
       td.bill_customer, td.pay_code_key, pc.pay_code, pt.project_type,
       tk.account_code
FROM   person_time_data td, project pr, task tk, person_time t,
       customer c, pay_code pc, project_type pt
WHERE td.project_key =pr.project_key AND
       td.person_time_key = t.person_time_key AND
       td.project_type_key = pt.project_type_key AND
       td.pay_code_key = pc.pay_code_key AND
       c.customer_key = pr.customer_key AND
       td.task_key *= tk.task_key
WITH CHECK OPTION

Copyright 1998, 1999 Computer Strategies, Inc., All Rights Reserved.
Last revised: May 25, 2000 11:29:16 AM EDT