Allen Pitts
asked on
PL/SQlL All the rows that have only one of the same value in as certain field
Hello expert,
Need to find the rows in a table that only have a value once in the
parent_company_id field.
Tried
SELECT employer_id,
employer_name,
employer_category_code,
parent_company_id,
alternate_name
from ccm_employer
GROUP BY parent_company_id, employer_id
HAVING COUNT(*) > 1
But it returns
ORA-00979: not a GROUP BY expression
00979. 00000 - "not a GROUP BY expression"
*Cause:
*Action:
Error at Line: 2 Column: 3
How can I get the needed result?
Thanks.
Allen in Dallas
Need to find the rows in a table that only have a value once in the
parent_company_id field.
Tried
SELECT employer_id,
employer_name,
employer_category_code,
parent_company_id,
alternate_name
from ccm_employer
GROUP BY parent_company_id, employer_id
HAVING COUNT(*) > 1
But it returns
ORA-00979: not a GROUP BY expression
00979. 00000 - "not a GROUP BY expression"
*Cause:
*Action:
Error at Line: 2 Column: 3
How can I get the needed result?
Thanks.
Allen in Dallas
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.