Hi! I'm having trouble trying to fill a DataSet with the results of a procedure I wrote. The procedure has 1 parameters and is composed of a select query (select id,text from Users where id=id_passed_by_param). My problem regards using this procedure to fill a DataSet. I was trying to do this...
Hum....sorry, doesn't work either....when I use this:
CREATE FUNCTION ListTopRegionsN (@reg_id int, @num int)
RETURNS @table table ([TerritoryID] [nvarchar] (20), [TerritoryDescription] [nchar] (50))
AS
begin
if exists (select 1 from Region where RegionID = @reg_id)
begin
insert into...
Hi! I'm trying to create an User Defined function that gives me the top rows of a table. I must be able to define wich is the top number of rows to be returned. I assume I could do this:
CREATE FUNCTION ListTopRegions (@reg_id int, @num int)
RETURNS @table table ([TerritoryID] [nvarchar] (20)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.