Results 1 to 4 of 4

Thread: Please Help!

  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Exclamation Unanswered: Please Help!

    hey guys!, i'm having trouble with a webpage, and it is a really important site, holding a lot of info. it use to work but whenever i try to go to this one particular page, this comes up on the screen,

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [SqlException: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.]
    System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
    System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior behavior) +45
    DotNetNuke.SchedulesDB.GetRefSchedList(Int32 ModuleId, Int32 UserId, Int32 RICRoleId, Int32 RefRoleId, String History, String StartDate, String EndDate)
    DotNetNuke.RefSchedules.Page_Load(Object sender, EventArgs e)
    System.Web.UI.Control.OnLoad(EventArgs e) +67
    System.Web.UI.Control.LoadRecursive() +35
    System.Web.UI.Control.LoadRecursive() +98
    System.Web.UI.Control.LoadRecursive() +98
    System.Web.UI.Control.LoadRecursive() +98
    System.Web.UI.Control.LoadRecursive() +98
    System.Web.UI.Page.ProcessRequestMain() +731


    i have no idea what this means. but please help me !! thanks a lot!!

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    We would need the SQL statement or stored procedure...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Basically, you have a query like

    select *
    from titles
    where au_id = (select au_id from titleauthor where somecondition)

    If the subquery returns two au_id's, then the main query will error out. Check for a query like this, and see if the somecondition is bringing back too many results. Maybe you have a problem with an undeclared primary key, or the somecondition is too vague. Good luck.

  4. #4
    Join Date
    Sep 2003
    Posts
    522
    if MCrowley's guess is correct about the type of query you have, then you can replace au_id = with exists, like this:

    Code:
    select * from titles t where exists (select 1 from titleauthor ta where t.au_id=ta.au_id and ta.au_id='what_ever')

Posting Permissions

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