sql - Oracle error 00979 -
getting error code following
select emp_id, emp_lname, emp_fname, assign_id, assign_comp, software.sft_id, count(sft_title) employee, assign_pc, software employee.emp_id = assign_pc.assign_emp grouping sft_title
it runs fine when take out count , grouping commands can't run otherwise. help appreciated.
thanks.
first, should utilize explicit join
syntax. second, need aggregate columns not arguments aggregation functions:
select emp_id, emp_lname, emp_fname, assign_id, assign_comp, software.sft_id, count(sft_title) employee bring together assign_pc on employee.emp_id = assign_pc.assign_emp cross bring together software grouping emp_id, emp_lname, emp_fname, assign_id, assign_comp, software.sft_id;
i'm not sure purpose of query is, sure looks missing join
status software
table. guess want like:
select emp_id, emp_lname, emp_fname, assign_id, assign_comp, software.sft_id, count(sft_title) employee bring together assign_pc on employee.emp_id = assign_pc.assign_emp bring together software on assign_pc.sft_id = software.sft_id grouping emp_id, emp_lname, emp_fname, assign_id, assign_comp, software.sft_id;
sql oracle
No comments:
Post a Comment