Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004

    Red face Unanswered: Subquery problem

    Hi y'all,

    I have a performance problem with a Query in a Paradox Database. I have the following tables (not exactly, just for the Idea)

    Table A: 849 rows [ID, Name]
    Table B: 27870 rows [ID, Integervalue, Date]

    When I try to execute the following Query, the system doesn't react and I have to close the program in the task manager.

    SELECT A.Name, B.Integervalue, MAX(B.Date)
    FROM tableA A , tableB B
    WHERE (A.Id = B.Id)
    and in (SELECT MAX(
    FROM tableB C
    WHERE C.Id = A.Id)
    GROUP BY A.Name, B.Integervalue
    ORDER BY A.Name ASC, B.Integervalue ASC

    When I don't use the subquery, I get more than 1 result a name... (actually I get count(B.Integervalue) results). Does someone can help me??

    Thanks in Advance.

  2. #2
    Join Date
    Jan 2004
    Hi k,

    1. edit ur SUBQuery as it should access object A for "tableA" like SELECT MAX(
    FROM tableB C, tableA A
    WHERE C.Id = A.Id

    So that sys will recognize "what is ?"


    2. first check ur subquery. Will it work separately then do the changes and then add NEW1 in the statement.


  3. #3
    Join Date
    Jan 2004


    Both of the tips didn't work out... Thanks for the reply anyway. More help is welcome!

Posting Permissions

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