Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Posts
    4

    Unanswered: SubQuery Problems

    Good Morning,

    Hoping someone can assist me here.

    I am reaching an error that states: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.




    when I run this query

    Code:
    SELECT  * 
    FROM    ChargeActive 
    INNER JOIN Fee 
    ON      Fee.ClientID     = ChargeActive.ClientID 
    WHERE   FinancialClass2 <> 
            (SELECT FinancialClass2 
            FROM    Carrier 
            INNER JOIN Transactions 
            ON      Transactions.CarrierID = Carrier.CarrierID 
            )
    Any advice would be greatfull. Basically what the end user would like to see is any FinancialClass2 that are not equal.

    I thought this would work...now completely lost.

    Thanks all

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Try replacing your <> with NOT IN
    More information on the IN operator can be found here http://w3schools.com/sql/sql_in.asp
    George
    Home | Blog

  3. #3
    Join Date
    Jun 2007
    Posts
    4
    Quote Originally Posted by georgev
    Try replacing your <> with NOT IN
    More information on the IN operator can be found here http://w3schools.com/sql/sql_in.asp
    Thank you very much George. That worked. Always the simplest solution.

    Cheers

Posting Permissions

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