THE SQL Server Blog Spot on the Web
Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | Join | Help

Re: getting error when accessing multiple tables

  •  07-09-2008, 12:00

    Re: getting error when accessing multiple tables

    Try:

    SELECT Q.Qname

    FROM Question q

    INNER JOIN Category_Details cd ON cd.idquestion = q.idquestion

    INNER JOIN Category c ON c.idCategory = cd.idCategory

    WHERE CategoryName = @CategoryName

    ... you can also eliminate the RETURN SCOPE_IDENTITY().  That only makes sense when you're inserting into a table with an IDENTITY column, and in this case no inserts are happening.

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement