If your query is along the lines of:
SELECT column
FROM table
WHERE column = (SELECT column2 FROM Table2)
The subquery can return multiple results. However, the = operator (or <>,
>, >=, <, <=, etc.) only compares a single value to a single value.
Instead, your query should use the IN (or NOT IN) operator as in:
SELECT column
FROM table
WHERE column IN (SELECT column2 FROM Table2)
--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/
Jeff Small wrote:
> [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC
> Microsoft Access Driver] At most one record can be returned by
> this subquery.
>
> What on earth?
>
> Admittedly, this isn't my code, but I'm tasked with figuring out
> why it's generating that error message...what, philosophically,
> would cause that?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240390
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54