anilvaghela
Registered User.
- Local time
- Today, 07:16
- Joined
- Sep 10, 2008
- Messages
- 12
Hello.....I have a stored procedure which does magic within MS SQL Express 2005.
Off course I am only using the ms sql express software on only this one table.
I want to be able to convert the following stored procedure into access.....
----------------------------------------------------------------------
Create PROC dbo.ShowHierarchy
(
@Root int
)
AS
BEGIN
SET NOCOUNT ON
DECLARE @u_id int, @namesite varchar(50), @unique_id varchar(50)
set @unique_id = (Select unique_id from dbo.tbl_search Where u_id=@Root)
set @namesite = (Select namesite from dbo.tbl_search Where u_id =@Root)
PRINT REPLICATE ('', @@NESTLEVEL *5) +@unique_id +',' +@namesite
Set @u_id= (Select MIN(u_id) From dbo.tbl_search where parent_id =@Root)
While @u_id is not null
BEGIN
Exec dbo.ShowHierarchy @u_id
set @u_id =(Select MIN(u_id) FROM dbo.tbl_search WHERE parent_id = @Root and u_id > @u_id)
END
End
GO
--------------------------------------------------------------------------
Your help would be appreciative!
Thanks
Anil
http://www.heavyvibesonline.co.uk
Off course I am only using the ms sql express software on only this one table.
I want to be able to convert the following stored procedure into access.....
----------------------------------------------------------------------
Create PROC dbo.ShowHierarchy
(
@Root int
)
AS
BEGIN
SET NOCOUNT ON
DECLARE @u_id int, @namesite varchar(50), @unique_id varchar(50)
set @unique_id = (Select unique_id from dbo.tbl_search Where u_id=@Root)
set @namesite = (Select namesite from dbo.tbl_search Where u_id =@Root)
PRINT REPLICATE ('', @@NESTLEVEL *5) +@unique_id +',' +@namesite
Set @u_id= (Select MIN(u_id) From dbo.tbl_search where parent_id =@Root)
While @u_id is not null
BEGIN
Exec dbo.ShowHierarchy @u_id
set @u_id =(Select MIN(u_id) FROM dbo.tbl_search WHERE parent_id = @Root and u_id > @u_id)
END
End
GO
--------------------------------------------------------------------------
Your help would be appreciative!
Thanks
Anil
http://www.heavyvibesonline.co.uk