problem in Query formation

  • Thread starter Thread starter subbu
  • Start date Start date
S

subbu

Hi,
I am using top command to select rows from the table
based on the condition.The query is returning 1 row
instead of 5 rows.

If i remove the where clause query retrieves 5 rows.

This is my query

ssql = "SELECT TOP " & iRowsSelected & " ACCT_AGRMT_SVCC.*
FROM ACCT_AGRMT_SVC WHERE Used =" & 0

here iRowsSelected is no of rows that is to be selected

Your suggestions is highly appreciated

subbu
 
Well, if the where clause is limiting the records returned to 1 then the TOP has
no real meaning if iRowsSelected in greater than 1.
 
Back
Top