Hi!
In the SP use following:
-- ... preparations
...
-- limit the rows in the result set
SET ROWCOUNT NNN
-- .. Result query that returns result set from SP
...
-- restire default
SET ROWCOUNT 0
You can also use 'SELECT TOP NNN' in your final query. In SQL Serevr this works for any query, however, test if this returns correct result.
HTH.
>Hi,
> I' using Crystal report 7.0 and VB 6 and sql 7.0
> i've one report which is returning top performers based on some criteria.
> now the resultSet may contain any no. of records.
> what i want to do is I wanaa paas a parameter to my report or stored procedure let's say N, so that the report will through up only N records.
> I tried alot but unable to solve it, i think there must be a way to do it but
> may be i'm going in wrong direction.
> any help ??????
>
>
>thanx in advance
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.