hi, this is quite urgent. i would need an answer within an hour if possible here is the situation
Details Table
Timesheet Table
with these two tables i wish to display the sum of the dehours as well as the timesheet id.
i can then link these sums to other tables. my prob is this
SQL> select sum(dehours),timesheetid
2 from details,timesheet;
select sum(dehours),timesheetid
*
ERROR at line 1:
ORA-00937: not a single-group group function
how can a sum be carried out and displayed on the oracle screen with details from another table it is linked too???
Details Table
Code:
CREATE TABLE Details (
ActivityId INT NOT NULL
CONSTRAINT Details_ActivityId_PK PRIMARY KEY,
deDescription VARCHAR2(40),
deDay VARCHAR2(10),
check (deDay in ('monday','tuesday','wednesday','thursday','friday')),
deHours INT NOT NULL,
Chargeable VARCHAR2(3)
Check (Chargeable in (‘yes’,’no’)));
Timesheet Table
Code:
CREATE TABLE Timesheet (
TimesheetId INT NOT NULL
CONSTRAINT Timesheet_TimesheetId_PK PRIMARY KEY,
tiWeekBeginning VARCHAR2(10),
ActivityId INT NOT NULL
CONSTRAINT Timesheet_ActivityId_FK
REFERENCES
Details(ActivityId),
CampaignId INT NOT NULL
CONSTRAINT Timesheet_CampaignId_FK
REFERENCES
Campaign(CampaignId),
StaffId INT NOT NULL
CONSTRAINT Timesheet_StaffId_FK
REFERENCES
Staff(StaffId));
with these two tables i wish to display the sum of the dehours as well as the timesheet id.
i can then link these sums to other tables. my prob is this
SQL> select sum(dehours),timesheetid
2 from details,timesheet;
select sum(dehours),timesheetid
*
ERROR at line 1:
ORA-00937: not a single-group group function
how can a sum be carried out and displayed on the oracle screen with details from another table it is linked too???