Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 31st, 2006, 07:23 AM
Registered User
 
Join Date: Jan 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default retriving data from master tables

Hi
i have 3 master tables 1)RoleDetails(Roleid(PK),name,masterroleid(fk) ref:RoleDetails roleid)
2) PositionDetails(positionid(PK), name,MasterPositionid(FK) ref:PostionDetails postionid,Roleid(fk) ref:Roledetails roleid)
3) Userdetails(userid(pk), loginid,pwd,roleid(fk) ref:roledetails roleid,positionid(fk)ref:postionDetails positionid,fname,address)
how to Create two functions one return child nodes as per Case 1 and another one is return Parent Nodes
as per case 2
        (Manager) a -- r1 (roledetails)
           / \

      (ROL)a1 (ROL) a2 -- r2
    / | \ / | (RO)b1 b2 b3 b4 b5 b6 -- r3
Case 1:
On passing the User ID of (a) , should get the Output as User id of ( b1,b2,b3,b4,b5,b6) along with their Role ID.

On passing the User ID of (a1), should get the Output as User ID of (b1,b2,b3)along with their Role ID.

Case 2:
On passing the Role ID of (R3), should get the User ID of all the Parent roles( a1 and a2 (R2), a(R1)long with their Role id

plz someone get me out of this.. thanks in advance.

ali





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to refesh Data in Master Form beetle_jaipur Access 4 July 19th, 2007 06:35 AM
Master/Detail read only data saf ASP.NET 2.0 Basics 9 January 19th, 2007 02:33 PM
Master/Detail Data Presentation in GridView AbrarNazeer ASP.NET 2.0 Professional 0 June 22nd, 2006 12:59 AM
Problem retriving data from access akhilvira ASP.NET 1.0 and 1.1 Basics 3 December 24th, 2004 07:03 AM
Getting data from tables MattLeek Access VBA 2 October 8th, 2003 11:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.