Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2010
    Posts
    5

    Unanswered: SELECT returns more than one row

    Hi

    I am using a simple Pass Through Query in MS Access to pull data from a Sybase database and populate a table in Access. This query has always worked in the past but has recently been throwing back the following error message:

    ODBC -- call failed.
    [Sybase][ODBC Driver][Adaptive Server Anywhere]SELECT returns more than one row(#-185)

    I have not changed the query so I am guessing this must be down to a data limit for the query being reached, a time out in connection or perhaps a duplicate row in the database or maybe a wrongly populated row?

    I have tried the google search and found nothing to help - the table in Access did have a lot of rows at about 380,000 but it should manage more than this I reckon as the limit for an Access table is 2GB. Cananyone help please? Spent 2 days on this already! Maybe an alternative SQL query is needed. The current query is somehing like:

    SELECT column1, column2, ...etc
    FROM tablename;

    SO basically selects all rows in a table in Sybase and certain columns and then puts them in an Access table.

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Maybe your data changed and now you do have more than one row returning from a sub select

  3. #3
    Join Date
    Jan 2010
    Posts
    5
    So what would the best way to solve this be? I guess your implying there is no primary key on the sybase table?

    The Sybase table is in fact a view does this make any difference?

  4. #4
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    Usualy this type of error appears when you have a sub-select in a WHERE clause
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  5. #5
    Join Date
    Jan 2010
    Posts
    5
    but there is no where clause here

  6. #6
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Show us the sql, maybe we can help.

  7. #7
    Join Date
    Jan 2010
    Posts
    5
    Access Pass Through Query:

    SELECT *
    FROM OPASAttendances_View;

    As I said this worked fine before, I just dont know how the query could suddenly be returning multiple rows?

  8. #8
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by 83dons View Post
    SELECT *
    FROM OPASAttendances_View;
    [sigh!!!] please show us the view
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  9. #9
    Join Date
    Jan 2010
    Posts
    5
    What do you need to see from the view? I dont have direct access to the Sybase server only through ISQL.

  10. #10
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by 83dons View Post
    What do you need to see from the view?
    whether it has a subquery
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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