TOP used in Stored Procedure

TOP used in Stored Procedure

Post by Tarek Tome » Fri, 23 Jul 1999 04:00:00



Is it possible to pass a variable to the TOP directive in a stored
procedure?



defined the variable as both a smallint and as an int.  Any help is greatly
appreciated.

The actual SP looks like this:

AS

 
 
 

TOP used in Stored Procedure

Post by Tony Rogerso » Fri, 23 Jul 1999 04:00:00


You should use dynamic sql...




--
Tony Rogerson MCP, SQL Server MVP
Torver Computer Consultants Ltd.
www.sql-server.co.uk ( Under construction - still ! )


> Is it possible to pass a variable to the TOP directive in a stored
> procedure?



> defined the variable as both a smallint and as an int.  Any help is
greatly
> appreciated.

> The actual SP looks like this:

> AS