2167 SELECT sub-query returned more than one row

Advantage Error Guide

Problem: A sub-query returned more than one row in a context where a single row was expected. For example, "SELECT * FROM table1 WHERE table1.field1 = (SELECT table2.field1 FROM table2)" is not valid if table2 contains more than one row.

Solution: Adjust the WHERE clause on the sub-query so that it returns only a single row.