Results 1 to 3 of 3

Thread: "Subquery returned more than 1 value" - problem

  1. #1
    Join Date
    May 2007
    Posts
    1

    "Subquery returned more than 1 value" - problem

    I am getting this message:
    "Subquery returned more than 1 value. This is not permitted when the
    subquery follows =, !=, <, <= , >, >= or when the subquery is used as
    an expression.
    The statement has been terminated."
    Is there any solution for this problem?
    Maybe some utility for repairing damaged database ?

  2. #2
    Join Date
    Dec 2004
    Posts
    502
    You do not have a damaged database. You have a bad query. It is exactly as the error message states. Please post your query and let's see where it's erroneous.

  3. #3
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    use "IN" instead of "="

    --fails if there are more than one row in table2

    select * from table1 where name=(select
    name from table2)

    --Try this
    select * from table1 where name in (select
    name from table2)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •