Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Top N Records/ Stored Procedure
Message
 
 
À
03/08/2001 01:03:43
Information générale
Forum:
Visual Basic
Catégorie:
Produits tierce partie
Divers
Thread ID:
00539241
Message ID:
00540081
Vues:
18
This message has been marked as the solution to the initial question of the thread.
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.com
ICQ #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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform